Pawno compiler bug
#1

Pawno compiler bug

PHP код:
    if(strcmp(cmd"/setadmin"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USAGE: /setadmin [playerid/PartOfName] [level(1-3)]");
                return 
1;
            }
            new 
para1;
            new 
level;
            
para1 ReturnUser(tmp);
            
tmp strtok(cmdtextidx);
            
level strval(tmp);
            if (
PlayerInfo[playerid][pAdmin] >= 6) || IsPlayerAdmin(playerid))
            {
                if(
IsPlayerConnected(para1))
                {
                    if(
para1 != INVALID_PLAYER_ID)
                    {
                        
GetPlayerName(para1giveplayersizeof(giveplayer));
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        
PlayerInfo[para1][pAdmin] = level;
                        
printf("AdmCmd: %s has promoted %s to a level %d admin."sendernamegiveplayerlevel);
                        
format(stringsizeof(string), "   You have been promoted to a level %d admin by %s"levelsendername);
                        
SendClientMessage(para1COLOR_LIGHTBLUEstring);
                        
format(stringsizeof(string), "   You have promoted %s to a level %d admin."giveplayer,level);
                        
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                    }
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   .:You need to be [Admin] to use this command:.");
            }
        }
        return 
1;
    } 
C:\Users\jaami\Desktop\stuffs\0.3c\gamemodes\gf.pw n(14391) : error 029: invalid expression, assumed zero
C:\Users\jaami\Desktop\stuffs\0.3c\gamemodes\gf.pw n(14391) : error 001: expected token: ";", but found ")"
C:\Users\jaami\Desktop\stuffs\0.3c\gamemodes\gf.pw n(14391) : error 029: invalid expression, assumed zero
C:\Users\jaami\Desktop\stuffs\0.3c\gamemodes\gf.pw n(14391) : fatal error 107: too many error messages on one line
Reply
#2

sry for submit two post
i defiend all already last time no error now i dont know why
Reply
#3

the line is
if (PlayerInfo[playerid][pAdmin] >= 6) || IsPlayerAdmin(playerid))

is thr wrong i change to this alos cant
if (PlayerInfo[playerid][pAdmin] >= 6 || IsPlayerAdmin(playerid))
still same
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)