Original Post
I am trying to make a text slot machine. But continue getting errors while trying to compile telling me that I am missing ";"'s somewhere. I continue to look but don't see them missing anywhere.(I understand I am not making the gamet the most efficient way, but I am the way that feels most comfortable to me. So please don't criticize on that, just help me fix my problem or do not comment at all) Thanks DeadBoy
#include <cstdlib>
#include <iostream>
using namespace std;
bool game = true;
bool selection = false;
int token;
int one;
int two;
int three;
int choice;
int x;
int main(int argc, char *argv[])
{
////////////////
while (game == true){//while game works
while (selection == false){
////////////////
cout<<"Please select the from the following."<<endl;
cout<<"1. Begin"<<endl;
cout<<"2. Quit"<<endl;
cout<<"Please press enter after you make your selection."<<endl;
cin>>choice;
/////////////////////////////////////////////////////////////////
if(choice == 1){
int token = 100;//you gain 100 tokens
system("CLS");//clear screen
selection = true;//stop using the other screen
srand(time(NULL));//set seed for random number
cout<<"Thank you for playing."<<endl;
cout<<"Press 1 and then enter to spin the machine."<<endl;
cout<<"Press 2 and then enter to quit the game."<<endl;
cout<<"After you spin it will subtract 5 tokens."<<endl;
cout<<"If you win you will gain 100 tokens!"<<endl;
cout<<"Have fun!!!"<<endl;
cin>>choice;
system("CLS");
if(choice == 1){
one = (rand()%11);
two = (rand()%11);
three = (rand()%11);
cout<<one<<" "<<two<<" "<<three<<" "<<endl;
if (one == two && one == three){
token + 100;
}
////////////////////////////////////////////////////////////////////////
}
if(choice == 2){
cout<<"Thanks for playing I hope you had fun ";
selection = true;
game = false;
}
}
}
system("PAUSE");
return EXIT_SUCCESS;
}