Scripting Help - 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: Scripting Help (
/showthread.php?tid=521893)
Scripting Help -
BeesSi - 25.06.2014
(130) : error 002: only a single statement (or expression) can follow each "case"
1 Error.
Код:
switch(glob0[playerid]) {
case 1:
SetPlayerPos(playerid, -2787.6155 + random(66), -294.2366 + random(8), 7.0399);
SetPlayerFacingAngle(playerid, random(360)); // Line 130
SetPlayerColor(playerid, 0x87CEEBAA);
SetPlayerPos(playerid, 1672.6181 + random(23), 1440.2609 + random(15), 10.7791);
SetPlayerFacingAngle(playerid, random(360));
SetPlayerColor(playerid, 0xFF0000AA);
SetPlayerPos(playerid, -1639.0776 + random(66), 655.8917 + random(14), 7.1901);
SetPlayerFacingAngle(playerid, random(360));
SetPlayerColor(playerid, 0x0000FFAA);
SetPlayerPos(playerid, 2471.2419 + random(36), -1684.1921 + random(30), 13.5459);
SetPlayerFacingAngle(playerid, random(360));
SetPlayerColor(playerid, 0x32CD32AA);
return 1;
}
Help
Re: Scripting Help -
BeesSi - 25.06.2014
Can anyone help me ?
Re: Scripting Help -
jessejanssen - 25.06.2014
pawn Код:
switch(glob0[playerid])
{
case 1:
{
SetPlayerPos(playerid, -2787.6155 + random(66), -294.2366 + random(8), 7.0399);
SetPlayerFacingAngle(playerid, random(360)); // Line 130
SetPlayerColor(playerid, 0x87CEEBAA);
SetPlayerPos(playerid, 1672.6181 + random(23), 1440.2609 + random(15), 10.7791);
SetPlayerFacingAngle(playerid, random(360));
SetPlayerColor(playerid, 0xFF0000AA);
SetPlayerPos(playerid, -1639.0776 + random(66), 655.8917 + random(14), 7.1901);
SetPlayerFacingAngle(playerid, random(360));
SetPlayerColor(playerid, 0x0000FFAA);
SetPlayerPos(playerid, 2471.2419 + random(36), -1684.1921 + random(30), 13.5459);
SetPlayerFacingAngle(playerid, random(360));
SetPlayerColor(playerid, 0x32CD32AA);
return 1;
}
}
You
have to use opening ( { ) and closing ( } ) brackets at a case, else it gives you errors.
Jesse
Re: Scripting Help -
BeesSi - 25.06.2014
Thanks for the code but , i got 12 errors after i paste the code
Re: Scripting Help -
Faisal_khan - 25.06.2014
The '12 errors' please.