22.12.2012, 10:45
pawn Код:
CMD:admins(playerid, params[])
{
if(!IsPlayerConnected(3)) return 1;
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
SendClientMessage(playerid, 0x1FFFFFF, "Administrators online:");
foreach(Player, i)
{
new level[128], string[128];
if(PlayerInfo[i][pAdmin] > 0)
{
switch(PlayerInfo[i][pAdmin])
{
case 1: level = ""adminlevel1" (1)";
case 2: level = ""adminlevel2" (2)";
case 3: level = ""adminlevel3" (3)";
case 4: level = ""adminlevel4" (4)";
case 5: level = ""adminlevel5" (5)";
}
format(string, sizeof(string), "%s %s", level, PlayerName(i)); // here are the errors
SendClientMessage(playerid, 0xFFF84FFFF, string);
}
}
return 1;
}
Код:
C:\Users\Mustafa\Desktop\Servers\Gta server\ForYou\gamemodes\TDMNIEUW.pwn(1065) : error 012: invalid function call, not a valid address C:\Users\Mustafa\Desktop\Servers\Gta server\ForYou\gamemodes\TDMNIEUW.pwn(1065) : warning 215: expression has no effect C:\Users\Mustafa\Desktop\Servers\Gta server\ForYou\gamemodes\TDMNIEUW.pwn(1065) : error 001: expected token: ";", but found ")" C:\Users\Mustafa\Desktop\Servers\Gta server\ForYou\gamemodes\TDMNIEUW.pwn(1065) : error 029: invalid expression, assumed zero C:\Users\Mustafa\Desktop\Servers\Gta server\ForYou\gamemodes\TDMNIEUW.pwn(1065) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.