I am working on a very simple text based game, but I am having a problem.
I am getting a syntax error on the last '}'.Code:#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(int argc, char *argv[])
{ /*variables*/
char name[101], help, action;
int php=50, ncphp=50;
srand(time(NULL));
/*end variables*/
printf("Please enter your name: ");
fgets (name, 101 , stdin);
printf("Hello, %s" , name);
printf("Have you played this game before? (Y or N) ");
while((help = tolower(getchar())) && help != 'y' && help != 'n');
if(help == 'n'){
printf("Type the letter of the action you wish to perform, the object of the game is to kill the guy.");
}
do{
printf("What would you like to do?\n[A]ttack\n[H]eal\n[R]un\n");
}
}
Can someone tell me what the problem is so far?
PS. Yes, I do know this will end after the last printf; I'm not done yet.