GLOBAL a = LoadSprite2("r1.png")
WHILE TRUE
DRAWSPRITE a, 10, 10
SHOWSCREEN
WEND
END
FUNCTION LoadSprite2: name$
STATIC ID
IF DOESFILEEXIST(name$)
LOADSPRITE name$,ID
INC ID,1
RETURN ID-1
ENDIF
ENDFUNCTION
Geht net.... wieso ?
Not bug, you can't set dynamicly in globals, you have to do that on a separate line.
GLOBAL a
a = LoadSprite2("r1.png")
That bug again!?
When was that gone? :-)
für meine Begriffe ist es ein Fehler...
Weil normal gehts ja auch
Global a = 1
You can't set it to something variable. A predefined number is fine but calling a function in a struct is not a good idea :-) I would like it to work too, creates cleaner looking code but it isn't working. It was working a year ago but only for one update, then all my programs stopped working and since then I'm using the long way of first creating the variable then assigning it. The reason why it doesn't work is in some other post, can't find it right now.