DBP 7.5
`init()
gosub mysub
wait key
end
mysub:
temp=array count(ArrayNotDeclared(0))
print temp
return
function init()
DIM ArrayNotDeclared(0)
endfunction
When using ARRAY COUNT on an array that does not exist, the program will crash upon the next call of the RETURN command. The same thing happens with ARRAY INDEX VALID and GET ARRAY TYPE.
If the RETURN command is not used, the command will simply return 0 (odd in its own right because it ought to return -1 if the array has no elements). This includes if the command is used in a function.
I know this is an obscure bug that can be avoided through proper coding, but there should be a more informative error message when this happens.
Latest progress: Fog of War implemented; frustrated by pathfinding >.>