I have a function, to initialise the game from the beginning
headerimg = LoadImage ( "header.png" )
headerplayimg = LoadImage ( "headerplay.png" )
header = CreateSprite ( headerimg )
headerplay = CreateSprite (headerplayimg )
This init() is in case 1, of g_state. Now also in the above code, when the header sprite is pressed
if ( GetPointerPressed ( ) = 1 )
g_state = 2
Delinit() is a function containing
When I try to launch, I get the error message
main.agc:42: error: Variable "header" is used without being defined or initialised
Do I need to use it in global or something? it is defined in the init() function.
Also, is this a good way of going from a title screen to a level selection, and then use something similar in case 3 to launch the actual game?
I have global g_State = 1 from the beginning, and I have the cases in a do---loop, like this
Thanks a lot, any help is appreciated