This is possibly related to the issue with LOCAL where the function is run twice, only this one causes a crash of your program with no explanation:
GLOBAL fff = test()
FUNCTION test:
RETURN 23
ENDFUNCTIONCaused me no end of headaches tracking this down.
Workaround for now - declare your GLOBAL's (and LOCAL's) and then assign a value to them on a separate line.
eg:
GLOBAL fff
fff = test()
this one is working. However, when you assign a function from GLBasic, the assignment might be done before the program has initialized the graphics engine.
Example:
GLOBAL t = GETTIMERALL() // bang!
I'll see if I can place the global assignments at a later point.
So far, please only assign constant values to GLOBAL initializations. RGB is a constant ;)
Will do.