Error "ondialogresponse" in "case" with the statement "if"
#1

I can not understand because it gives me these errors:

Код:
error 012: invalid function call, not a valid address
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
fatal error 107: too many error messages on one line
The code:

Код:
 		else if(dialogid == 9999) // SISTEMA POSTALE
		{
        switch(listitem)
	      {
          case 0:
		      {
                  if(StipendioGelataio(playerid) == 1)   // ERRORS IN THIS STRING
				  {
				  SendClientMessage(playerid, COLOR_YELLOW, "[POSTE:] Devi aspettare il PayDay per poter ritirare il tuo stipendio!");
				  return 1;
				  }
				  else if(StipendioGelataio(playerid) == 2)
				  {
				  GivePlayerMoney(playerid, 1600);
				  SendClientMessage(playerid, COLOR_YELLOW, "[POSTE:] Hai ritirato il tuo stipendio, che equivale a 1600$");
				  StipendioGelataio(playerid) = 0;
				  return 1;
				  }
				  else
				  {
				  SendClientMessage(playerid, COLOR_YELLOW, "[POSTE:] Non hai lavorato, quindi non hai uno stipendio da poter ritirare!");
				  return 1;
				  }
			  }
          }
	    }
Thank!
Reply
#2

Must remove else from else if and you put it in case make before switch

Edited
Reply
#3

Quote:
Originally Posted by TomatoRage
Посмотреть сообщение
Must remove else from else if and you put it in case make before switch

Edited
I have already tried, the same mistakes ...
Reply
#4

Did you define StipendioGelataio?
Reply
#5

Quote:
Originally Posted by SilverKiller
Посмотреть сообщение
Did you define StipendioGelataio?
Yes! Up the gamemode:

Код:
new StipendioGelataio[MAX_PLAYERS] = 0;
Reply
#6

Try replacing the () with []
pawn Код:
if(StipendioGelataio[playerid] == 1)
Reply
#7

Quote:
Originally Posted by Revo
Посмотреть сообщение
Try replacing the () with []
pawn Код:
if(StipendioGelataio[playerid] == 1)
It works! Thanks to all!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)