I searched the forums for any similar topics and did not find any, so I apologize if this has already been covered somewhere else.
I just purchased a copy of AGK2 in the recent Game Makers Humble Bundle.
I've been having a pretty good go of it so far, but I've hit a snag that has me stuck.
I'm trying to write a generic XML parser and the AppGameKit player is convinced that one of my functions is returning an integer, even though it is currently returning a user defined type.
type XML_Lines
lines as integer[-1,-1]
cur_line as integer
endtype
function __XML_ParseNodeVals(line as integer[])
lines as XML_Lines
cur_line as integer[-1]
for i = 0 to line.length - 1
if line[i] = OPEN_TAG or line[i] = CLOSE_TAG
next i
else if line[i] = SPACE
if cur_line.length >= 0
lines.lines.insert(cur_line)
cur_line.length = -1
endif
else
cur_line.insert(line[i])
endif
endfunction lines
And here is the section of code that calls the above function:
parselines as XML_Lines
parselines = __XML_ParseNodeVals
The error I keep getting is:
xmlparser.agc:233: error: Tried to assign Integer to Type
which is the line where
parselines calls the
__XML_ParseNodeVals function.
Any ideas? It's a good possibility that I'm just too close to the code to see my error.
Thanks,
Clay