GLOBAL and assignment crashes windows Vista (not tested in XP)

Previous topic - Next topic

AndyH

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:

Code (glbasic) Select
GLOBAL fff  = test()
FUNCTION test:
RETURN 23
ENDFUNCTION
Caused 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()

Kitty Hello

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 ;)