whenever i try to run my program it always has this error
"In function mainrift"
"syntax error at the end input"
can someone help me.
void mainrift()
{
int days = 1, choice = 0, gil = 20000, debt = 50000;
int depgil = 0, phoenixdown1 = 0, elixiressence1 = 0, platinumingot1 = 0, goldenmateria1 = 0, scarletite1= 0;
int adamantite1 = 0, darkmatter1 = 0, trapezohedron1 = 0;
do
{
system("cls");
{
printf ("Gilgamesh: Where would my travels take me? \n\n");
printf ("\t [1] Tycoon Meteor's Minerals\n");
printf ("\t [2] Pulsian Restoratives\t\t\t\t");
printf ("DAY %d\n",days);
printf ("\t [3] Archadian Luxuries\n");
printf ("\t [4] Cid's Magical Escapedes\t\t\t\t");
printf ("Gil: %d\n",gil);
printf ("\t [5] Gaian Gratitudes\t\t\t\t\t");
printf ("Debt: %d\n",debt);
printf ("\t [6] Riches and Minerals of Spira\t\t\t");
printf ("[8]Quit\n");
printf ("\t [7] Go see the Merchant of the Rift\n");
printf ("\n\n\n\n");
printf ("Your Choice: ");
scanf ("%d", &choice);
switch (choice)
{
case 1:
{
Tycoons(&phoenixdown1,&elixiressence1,&platinumingot1,&goldenmateria1, &scarletite1,&adamantite1,&darkmatter1,&trapezohedron1,&gil,&debt, choice,days);
if (debt != 0)
debt = debt + ( debt * 15 ) / 100;
else
debt = 0;
if (depgil == 0)
depgil = 0;
else
{
depgil = depgil + (depgil * 10) / 100;
days++;
}
}
break;
case 2:
{
Pulsian(&phoenixdown1,&elixiressence1,&platinumingot1,&goldenmateria1, &scarletite1,&adamantite1,&darkmatter1,&trapezohedron1,&gil,&debt, choice,days);
if (debt != 0)
debt = debt + ( debt * 15 ) / 100;
else
debt = 0;
if (depgil == 0)
depgil = 0;
else
{
depgil = depgil + (depgil * 10) / 100;
days++;
}
}
break;
case 3:
{
Archadian(&phoenixdown1,&elixiressence1,&platinumingot1,&goldenmateria1, &scarletite1,&adamantite1,&darkmatter1,&trapezohedron1,&gil,&debt, choice,days);
if (debt != 0)
debt = debt + ( debt * 15 ) / 100;
else
debt = 0;
if (depgil == 0)
depgil = 0;
else
{
depgil = depgil + (depgil * 10) / 100;
days++;
}
}
break;
case 4:
{
Cids(&phoenixdown1,&elixiressence1,&platinumingot1,&goldenmateria1, &scarletite1,&adamantite1,&darkmatter1,&trapezohedron1,&gil,&debt, choice,days);
if (debt != 0)
debt = debt + ( debt * 15 ) / 100;
else
debt = 0;
if (depgil == 0)
depgil = 0;
else
{
depgil = depgil + (depgil * 10) / 100;
days++;
}
}
break;
case 5:
{
Gaian(&phoenixdown1,&elixiressence1,&platinumingot1,&goldenmateria1, &scarletite1,&adamantite1,&darkmatter1,&trapezohedron1,&gil,&debt, choice,days);
if (debt != 0)
debt = debt + ( debt * 15 ) / 100;
else
debt = 0;
if (depgil == 0)
depgil = 0;
else
{
depgil = depgil + (depgil * 10) / 100;
days++;
}
}
break;
case 6:
{
Riches(&phoenixdown1,&elixiressence1,&platinumingot1,&goldenmateria1, &scarletite1,&adamantite1,&darkmatter1,&trapezohedron1,&gil,&debt, choice,days);
if (debt != 0)
debt = debt + ( debt * 15 ) / 100;
else
debt = 0;
if (depgil == 0)
depgil = 0;
else
{
depgil = depgil + (depgil * 10) / 100;
days++;
}
}
break;
case 7:
{
merchant(days,&gil,&debt,&depgil);
}
break;
}
}while ((days!=30) && (choice!=8));
}
end(gil,debt,days);
}
int main()
{
int option, start;
system ("cls");
printf ("GILGAMESH'S MEGA GIL ADVENTURES!");
printf ("\n\n\n");
printf ("Play? [1]Yes or [2]No\n");
scanf ("%d",&option);
if (option == 1)
{
system("cls");
printf ("Story:\n");
printf ("You play as Gilgamesh, a warrior lost in the rift\nwho ends up travelling into different worlds. \n");
printf ("As aweapon collector in search for the\nlegendary weapon Excalibur, he aims \n");
printf ("to travel to different worlds to one day come up\nwith that legendary weapon. Armed with extremely powerful\n");
printf ("weapons he has collected during his recent travels, \nhe sets off on a journey to other worlds.\n\n");
printf ("However, he realized that in order for him to do this, he needs money\nduring his travels. He needs money to purchase equipment that he \nwill need during his");
printf ("battles, and more importantly, to buy \nrare weapons that he sets his eyes on. The only reasonable \nway he can obtain money is by earning them in an \nhonest manner, and that is");
printf (" \nthrough buying and selling goods he purchases from other worlds.\n\n");
printf ("Unfortunately, he does not have much goods to his name\n, save for his Genji equipment which ");
printf ("he can sell at \nthe beginning of his journey for a hefty amount.\n\n");
printf ("However, he realizes that items that are considered as priceless in \ndifferent worlds are quite");
printf ("common in another world. \nAs a traveller of the rift, he could use this to his advantage to buy low");
printf ("\nfrom another world and to sell high in another.");
printf ("\n\nAs a sneaky way of earning money, the Merchant of the Rift offers Gilgamesh \nsome money to");
printf ("help him start with his adventure, \nwith his Genji Equipment as collateral. Gilgamesh, \none who ");
printf ("does not think much before acting \nhastily agreed, but not before the Merchant of the Rift ");
printf ("explains that his \ndebt interest increases by 15 percent every day!\n\n");
printf ("Continue to play? [1]Yes or [2]No\n");
scanf ("%d",&start);
if ( start == 1 )
{
mainrift();
}
else if ( start == 2 )
{
system("exit");
}
}
else if (option == 2)
system("exit");
getch();
}