SA-MP Forums Archive
(1913) : 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: (1913) : error 002: only a single statement (or expression) can follow each "case" ;/ (/showthread.php?tid=567616)



(1913) : error 002: only a single statement (or expression) can follow each "case" ;/ - Pacanaz - 15.03.2015

(1913) : error 002: only a single statement (or expression) can follow each "case"

The the 1913 line is bolded

Quote:

default:
{
SendClientMessage(playerid, Balta, "Invalid license type! /siren [type]");
SendClientMessage(playerid, Pilka, "Type: 1 = Roof, 2 = Inside, 3 = Off.");
}
else SendClientMessage(playerid, Balta, "You're not authorised to use this command.");
return 1;
}

forward ProxDetector(Float:radi, playerid, targetid);
public ProxDetector(Float:radi, playerid, targetid)
{
if(IsPlayerConnected(playerid)&&IsPlayerConnected( targetid))
{
new Float:posx, Float:posy, Float:posz;
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
GetPlayerPos(targetid, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}



Re: (1913) : error 002: only a single statement (or expression) can follow each "case" ;/ - Pacanaz - 15.03.2015

Uhhh, I had like 3 errors and I'm left with this one, isn't there a quick fix for it ? ;/