In my main.m I have the following code in my init method,
then in main.m I have this in my idle method,
StartGame and gameidle are methods in my game.m file and the class is declared in game.h and "dead" is a variable for the "po" object (player object). Can someone help explain why that variable and object is giving errors and how I can solve it? Any help would be appreciated.
Code:
id po;
po = [playerobj alloc];
po = [[playerobj alloc]CreateGame];
[po StartGame];
then in main.m I have this in my idle method,
Code:
if (dead == YES) // error: 'dead' undeclared (first use in function)
{
[po StartGame]; // error: 'po' undeclared (first use in function)
}
[po gameidle]; // error: 'po' undeclared (first use in function)
return;
StartGame and gameidle are methods in my game.m file and the class is declared in game.h and "dead" is a variable for the "po" object (player object). Can someone help explain why that variable and object is giving errors and how I can solve it? Any help would be appreciated.