4 Replies - 291 Views - Last Post: 16 January 2013 - 12:32 PM Rate Topic: -----

#1 razoe  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 19-December 12

About a game in rpg using c language 2

Posted 16 January 2013 - 11:00 AM

hi everybody again
after a lot of hard work and some night's lost
we have a problem in the final
when we compile the hole game appear some errors
that say
in function 'frente2'

syntax error before 'int'

any ideia why?

best regards
Is This A Good Question/Topic? 0
  • +

Replies To: About a game in rpg using c language 2

#2 jimblumberg  Icon User is offline

  • member icon


Reputation: 3993
  • View blog
  • Posts: 12,323
  • Joined: 25-December 09

Re: About a game in rpg using c language 2

Posted 16 January 2013 - 11:10 AM

You need to post some code so we can have some content along with the complete error messages. These messages have important information embedded within them to aid in locating and fixing the error. One of these items ist the line number that where the error was detected. You start at that line and work your way backwards until you find the error.

Jim
Was This Post Helpful? 1
  • +
  • -

#3 razoe  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 19-December 12

Re: About a game in rpg using c language 2

Posted 16 January 2013 - 11:22 AM

the code is this
int frente2(int op11)
{
	printf("A tua frente encontras o troféu. Parabéns acabas-te o jogo\n");
	printf("Escolhe uma opção:\n");
	printf("                   |      1-Jogar de Novo                       |\n");
    printf("                   |      0-Acabar                              |\n");
	do
      {
      scanf("%d", & op11);
      }while(op11!=0 && op11!=1);//pede a opçao pertendida 
      
      switch(op11)//switch case... abre a escolha pertendida pelo utilizador, case 1 para opçao 1 e case 0 para 0
      {
      case 1://jogar de novo
      int crazy();
	  break;
	  case 0://opçao k permite ao utilizador sair do jogo
      int finish();
      break;
      }while(op11!=0);//ciclo do while. fica em ciclo continuo ate que o utilizador introduzir 0
}

Was This Post Helpful? 0
  • +
  • -

#4 jimblumberg  Icon User is offline

  • member icon


Reputation: 3993
  • View blog
  • Posts: 12,323
  • Joined: 25-December 09

Re: About a game in rpg using c language 2

Posted 16 January 2013 - 11:32 AM

Is this possibly the line your compiler is complaining about?
      int crazy();

You may want to study the function tutorials contained in my signature, that is not how you call a function.

Where are your error messages?


Jim
Was This Post Helpful? 0
  • +
  • -

#5 razoe  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 19-December 12

Re: About a game in rpg using c language 2

Posted 16 January 2013 - 12:32 PM

thanks any way
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1