17.06.2012, 16:23
Command:
Errors:
Line 2903:
pawn Код:
CMD:warn(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1 || IsPlayerAdmin(playerid) || PlayerInfo[playerid][pVip] >= 3)
{
{
new targetid, reason;
new Name[MAX_PLAYER_NAME];
new Name1[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
GetPlayerName(targetid, Name1, MAX_PLAYER_NAME);
if(sscanf(params, "ri", targetid, reason)) return SendClientMessage(playerid, COLOR_PURPLE,"Usage: /warn [playerid] [reason]");
if(targetid == playerid) return SendClientMessage(playerid, COLOR_DRED, "You Can't Warn Yourself!");
}
else
{
new str[128];
format(str, sizeof(str), "Administrator %s Has Warned %s Reason: %d!", Name, Name1, reason);
SendClientMessageToAll(COLOR_DRED,str);
Warns[targetid] ++;
}
}
}
pawn Код:
C:\Users\asus\Desktop\Server 0.3e\gamemodes\Stunt.pwn(2900) : error 029: invalid expression, assumed zero
C:\Users\asus\Desktop\Server 0.3e\gamemodes\Stunt.pwn(2903) : error 017: undefined symbol "Name"
C:\Users\asus\Desktop\Server 0.3e\gamemodes\Stunt.pwn(2905) : error 017: undefined symbol "targetid"
C:\Users\asus\Desktop\Server 0.3e\gamemodes\Stunt.pwn(2908) : warning 209: function "cmd_warn" should return a value
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.
pawn Код:
format(str, sizeof(str), "Administrator %s Has Warned %s Reason: %d!", Name, Name1, reason);