01.03.2013, 22:09
I'm using ZCMD and sscanf etc.. this /expl code isn't working, why?
These are my errors:
pawn Код:
CMD:explode(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
new string[128], id, Float:x, Float:y, Float:z, name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerPos(id, Float:x, Float:y, Float:z);
if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "USAGE: /expl [id/partofname]");
CreateExplosion(Float:x, Float:y, Float:z, 0, 30);
format(sendername, sizeof(sendername), "%s", Name(playerid));
format(giveplayer, sizeof(giveplayer), "%s", Name(targetid));
format(string, sizeof(string), "%s was exploded by %s.", giveplayer, sendername);
SendAdminMessage(C_GREY,string);
return 1;
}
return 1;
}
These are my errors:
pawn Код:
C:\Users\Guest\Desktop\Battlefield Server 1.8\gamemodes\battlefield.pwn(3033) : error 017: undefined symbol "sendername"
C:\Users\Guest\Desktop\Battlefield Server 1.8\gamemodes\battlefield.pwn(3033) : error 017: undefined symbol "sendername"
C:\Users\Guest\Desktop\Battlefield Server 1.8\gamemodes\battlefield.pwn(3033) : error 029: invalid expression, assumed zero
C:\Users\Guest\Desktop\Battlefield Server 1.8\gamemodes\battlefield.pwn(3033) : 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.