help please
#1

hi i need help i get errors:

pawn Код:
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(28) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(28) : warning 215: expression has no effect
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(28) : warning 215: expression has no effect
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(28) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(28) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(28) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
it says line 28

and this in line 28:

pawn Код:
if(strcmp(cmd, "/makeadmin", true) == 0)
what is it?
can anyone help me ty alot
Reply
#2

The line itself is not the problem, it's where the line is in relation to the lines around it, you'd need to send a bit more.
Reply
#3

Quote:
Originally Posted by Weirdosport
The line itself is not the problem, it's where the line is in relation to the lines around it, you'd need to send a bit more.
this?
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmd, "/makeadmin", true) == 0)
{
if (PlayerInfo[playerid][pAdminLevel] == 5 || IsPlayerAdmin(playerid))
    {
    tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, ORANGE, "USAGE: /makeadmin [playerid] [level 1-5]");
            SendClientMessage(playerid, ORANGE, "FUNCTION: Player will be an admin. **PLEASE ENTER THE ID ONLY!**");
            return 1;
        }
        giveplayerid = ReturnUser(tmp);
        tmp = strtok(cmdtext, idx);
        level = strval(tmp);
        if(giveplayerid != INVALID_PLAYER_ID)
        {
                GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                GetPlayerName(playerid, sendername, sizeof(sendername));
                PlayerInfo[giveplayerid][pAdminLevel] = level;
                printf("[ADMIN NEWS]: %s made %s a level %d admin.", sendername, giveplayer, level);
                format(string, sizeof(string), "You are now an administrator level %d thanks to %s.", level, sendername);
                SendClientMessage(giveplayerid, LIGHTBLUE, string);
                format(string, sizeof(string), "You have given %s level %d admin.", giveplayer,PlayerInfo[giveplayerid][pAdminLevel]);
                SendClientMessage(playerid, LIGHTBLUE, string);
        }
        else if(giveplayerid != INVALID_PLAYER_ID)
        {
            format(string, sizeof(string), "%d is not an active player.", giveplayerid);
            SendClientMessage(playerid, RED, string);
        }
    }
    else
    {
    SendClientMessage(playerid, RED, "You are not a lead admin!");
    }
return 1;
}
that?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)