Tutorial Error
#1

I got the following error:
Код:
error 029: invalid expression, assumed zero
On these 2 lines:
Код:
                    ShowPlayerDialog(playerid,  PCMENU, DIALOG_STYLE_LIST, "Provoking Cops is allowed ?","Yes it is\nIf the cop Agree\nNever unless with Admin Permission", "Select", "Cancel");
And..
Код:
		if(dialogid == PCMENU)
But I can't see whats wrong with it?


Код:
		if(dialogid == PGMENU)
	{
		if(response)
		{
			if(listitem == 0) //
			{
        	    if(RegistrationStep[playerid] == 5)
         	    {
                    RegistrationStep[playerid] = 6;
                    ShowPlayerDialog(playerid,  PCMENU, DIALOG_STYLE_LIST, "Provoking Cops is allowed ?","Yes it is\nIf the cop Agree\nNever unless with Admin Permission", "Select", "Cancel");
              		return 1;
 			    }
			}
			if(listitem == 1) //
			{
        	    if(RegistrationStep[playerid] == 5)
         	    {
                    SendClientMessage(playerid, COLOR_RED, "Answer Result : Wrong - You have been Kicked.");
              		Kick(playerid);
              		return 1;
 			    }
			}
			if(listitem == 2) //
			{
        	    if(RegistrationStep[playerid] == 5)
         	    {
                    SendClientMessage(playerid, COLOR_RED, "Answer Result : Wrong - You have been Kicked.");
              		Kick(playerid);
              		return 1;
 			    }
			}
		}
		return 1;
	}
		if(dialogid == PCMENU)
	{
		if(response)
		{
			if(listitem == 0) //
			{
        	    if(RegistrationStep[playerid] == 6)
         	    {
                    SendClientMessage(playerid, COLOR_RED, "Answer Result : Wrong - You have been Kicked.");
              		Kick(playerid);
              		return 1;
 			    }
			}
			if(listitem == 1) //
			{
        	    if(RegistrationStep[playerid] == 6)
         	    {
                    SendClientMessage(playerid, COLOR_RED, "Answer Result : Wrong - You have been Kicked.");
              		Kick(playerid);
              		return 1;
 			    }
			}
			if(listitem == 2) //
			{
        	    if(RegistrationStep[playerid] == 6)
         	    {
                    RegistrationStep[playerid] = 7;
                    ShowPlayerDialog(playerid,  CKMENU, DIALOG_STYLE_LIST, "What does CK mean?","Never heard of\nChicken Krap\nCharchter Kill", "Select", "Cancel");
              		return 1;
 			    }
			}
		}
		return 1;
	}
EDIT: Pastebin: http://pastebin.com/xgvJnZ4g
Errors are in Line 10 and 35
Reply
#2

Your code is really messed up,
please upload it at http://pastebin.com/ because everything is just at the wrong place
Reply
#3

Posted
Reply
#4

What callback is this under, OnDialogResponse?
Edit: also, what have you defined PCMENU as?
Reply
#5

Yes its under OnDialogResponse
And did you mean this?
#define PCMENU 3641 ?


EDIT: Im sorry, it was a typo in the Define, Thanks for the help anyway
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)