So just for fun, I'm creating a text-based game. However, I've run into a problem with the character choice.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
int response;
int myChoice;
int section=0;
int bug=0;
while(myChoice==0)
{
cout<<"The start of your journey begins in the training hall"<<endl;
cout<<"Here in the training hall you can choose the type of character you want to be"<<endl;
cout<<"There are three different classes you can be"<<endl;
cout<<"Enter '1' for a warrior-soldier"<<endl;
cout<<" a warrior-knight has higher strength"<<endl;
cout<<"Enter '2' for a mage"<<endl;
cout<<" a mage has higher inteligence"<<endl;
cout<<"Enter '3' for a theif"<<endl;
cout<<" a theif has higher speed"<<endl;
cin>>myChoice;
story.choose(myChoice);
}
Unfortunately, story.choose(myChoice); gives me an error for (myChoice), the error that it gives me is "myChoice is not a type name." Also, the period gives me the error "expected an identifier." (story.choose(myChoice); is from story.h)