Tutorial Error - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Tutorial Error (
/showthread.php?tid=434479)
RP Quiz. Error -
Facerafter - 02.05.2013
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
Re: Tutorial Error -
Jimmy0wns - 02.05.2013
Your code is really messed up,
please upload it at
http://pastebin.com/ because everything is just at the wrong place
Re: Tutorial Error -
Facerafter - 02.05.2013
Posted
Re: Tutorial Error -
MattyG - 02.05.2013
What callback is this under, OnDialogResponse?
Edit: also, what have you defined PCMENU as?
Re: Tutorial Error -
Facerafter - 02.05.2013
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