SA-MP Forums Archive
A little 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: A little error? (/showthread.php?tid=270841)



A little error? - lawonama - 21.07.2011

pawn Код:
if(GetPlayerSkin(playerid)=288) || (GetPlayerSkin(playerid)=280) || (GetPlayerSkin(playerid)=281) || (GetPlayerSkin(playerid)=282) || (GetPlayerSkin(playerid)=283) || (GetPlayerSkin(playerid)=284) || (GetPlayerSkin(playerid)=285)
Getting five errors on the line above:
pawn Код:
warning 211: possibly unintended assignment
error 022: must be lvalue (non-constant)
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Thanks for helps.


Re: A little error? - [HiC]TheKiller - 21.07.2011

pawn Код:
new skin = GetPlayerSkin(playerid);
if ((skin > 279 && skin < 286) || skin == 288)



Re: A little error? - Basicz - 21.07.2011

I'd like to use SWITCH.

pawn Код:
switch ( GetPlayerSkin( playerid ) )
{
    case 270 .. 285, 288 :
    {
        // Code
    }
}