I edited the update function to not return anything and now I get another error (same line number):
Parameter for 'getGID' do not match 'float' at line 91.
Inside updateCharPosition() I make several calls to getGID() which looks like this:
function getGID(x#, y#)
ti = tmx_GetTileIndex(1, x#, y#)
if ti < 0 or ti > TMX_Map.mapWidth*TMX_Map.mapHeight then exitfunction 0
gid = TMX_Map[1, ti].gid
endfunction gid
I've removed all code inside the function so I'm left with nothing but the function declaration really and still get the same error. I'm passing floats into it, this makes no sense and it's wasting a lot of my time now.
Ok, I've removed any call to getGID() completely and even renamed the function itself. Same error. Removed the function from code, now I just get the same parameter error on the next function below it. WTF
So what's the rules for defining UDTs in separate files? I've put several UDT definitions in a separate file and include. And usually it works perfectly fine, or has so in the past. My TMX importer is a separate file and defines the UDTs it uses inside its file and it works when included in any of my programs. However, attempting to put my PlayerProperties inside a separate file is what's causing the weird error mentioned above (which makes literally no sense at all).