OK, so for a simple process-using program so far I have this:
/*
LinuxLander/BennuGD
*/
import "mod_say"
Const
MoveBaseStart = 3; // The starting value for moving the vertical base.
End
Declare Process Test ()
Private
End
Public
End
End
Global
int GameState = 0; /**< 0 = playing, 1 = win, -1 = went off edges of screen, -2 = missed the base. */
int PlayerX = 0; /* The player's X location. */
int PlayerY = 0; /* Player's Y location. */
int BaseX = 0; /* As for the player... */
int BaseY = 0; /* ...but detailing the base's location. */
int MoveBaseX = 0; /* Controls the horizontal movement of the base. */
int MoveBaseY = MoveBaseStart; /* Vertical base movement. */
Test ItsATest; // This is where uncommenting the line below gives an error.
End
Process Main ()
Public
int a = 0;
Private
Begin
// ItsATest (); // Uncommenting this line causes the compiler to give an error.
Test ();
frame;
OnExit
say ("Thanks for playing!");
End
Process Test ()
Begin
say (id);
frame;
End
What I want to know is - how does BennuGD call an instance of a process (like ItsATest)? Can it? It can call the process itself, but attempting to call the instance of the process gives:
/home/stuart/tmp/2/LinuxLander.prg:26: error: Undefined procedure ( token error: "ITSATEST" ).
Is what I'm asking possible? I'm wondering if the signal command would do what I want, but I'm not sure. Advice?
Interestingly, this is
not the line that causes the error, that's the ItsATest (); statement.