SA-MP Forums Archive
Something must be wrong here.. - 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: Something must be wrong here.. (/showthread.php?tid=408054)



Something must be wrong here.. - geohareas - 16.01.2013

PHP код:
(26498): warning 219local variable "string" shadows a variable at a preceding level
(26498) : error 017undefined symbol "params"
(26498) : warning 215expression has no effect
(26498) : error 001expected token";"but found "]"
(26498) : error 029invalid expressionassumed zero
(26498) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

PHP код:
    if(!strcmp(cmdtext"/setvip"true) || !strcmp(cmdtext"/sv"true))
    {
        if (
IsPlayerAdmin(playerid) )
        {
            new 
string[200], poslevel;
           if(!
params[0]||!(pos=chrfind(' ',params)+1)||!params[pos]) return SendClientMessage(playeridCOLOR_RED" USAGE: /setlevel [ID] [0-4]");//26498 
            
new id strval(params[0]);
            
level strval(params[pos]);
            if(!
IsPlayerConnected(id))  return SendClientMessage(playeridCOLOR_RED"  Player with this ID is not on the server !");
            if(
level || level 4) return SendClientMessage(playeridCOLOR_RED"  The level must be betwen 0 and 4 !");
            
format(stringsizeof(string), " **Administrator %s has changed your VIP Level."PlayerName(playerid), PlayerName(id), level);
            
SendClientMessageToAll(COLOR_REDstring);
            
PlayerInfo[id][pVIP] = level;
            
printf("vip level = %d"PlayerInfo[id][pVIP]);
        }
        return 
1;
    } 
any idea?