12.05.2009, 13:30
i i need help i get errors this are the errors:
this is the command:
it says line 30
this is line 30:
i need help ty alot
pawn Код:
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : warning 215: expression has no effect
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : warning 215: expression has no effect
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : fatal error 107: too many error messages on one line
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;
}
this is line 30:
pawn Код:
if(strcmp(cmd, "/makeadmin", true) == 0)