error 002: only a single statement (or expression) can follow each "case" - 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: error 002: only a single statement (or expression) can follow each "case" (
/showthread.php?tid=612075)
error 002: only a single statement (or expression) can follow each "case" -
Izaki - 13.07.2016
PHP код:
zma.pwn(2034) : error 002: only a single statement (or expression) can follow each "case"
zma.pwn(2034) : warning 215: expression has no effect
zma.pwn(2035) : warning 209: function "OnDialogResponse" should return a value
ss scipt
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 253) {
if(response) {
if(listitem == 0)
{
if(GetPlayerMoney(playerid) > 4050)
{
GivePlayerMoney(playerid,-4050);
GivePlayerWeapon(playerid,34,40);
}
else {
SendClientMessage(playerid, -1, ""COL_ORANGE"[SERVER]"COL_WHITE" Not enough money.");
}
}
return 1;
}
Re: error 002: only a single statement (or expression) can follow each "case" -
DRIFT_HUNTER - 13.07.2016
You forgot to close one bracket just before before return.
Re: error 002: only a single statement (or expression) can follow each "case" -
Dayrion - 14.07.2016
Show the whole callback function, please.
Re: error 002: only a single statement (or expression) can follow each "case" - WhiteGhost - 14.07.2016
Quote:
Originally Posted by Dayrion
Show the whole callback function, please.
|
FOR WHAT DRIFT_HUNTER Outlined what to do.
Re: error 002: only a single statement (or expression) can follow each "case" -
Izaki - 14.07.2016
thanks all