15.12.2011, 15:30
pawn Код:
if(strcmp(cmd, "/setskin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setskin [Playerid/PartOfName] [skin id]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 299 || level < 1) { SendClientMessage(playerid, COLOR_GREY, "Wrong skin ID!"); return 1; }
if (PlayerInfo[playerid][pAdmin] >= 2)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "You have set %s's skin to %d.", giveplayer,level);
SendClientMessage(playerid, COLOR_GRAD2, string);
SetPlayerSkin(para1, level);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "You are not authorised to use that command.");
}
}
return 1;
}
Ive have this command in a script of mine, Was a ripoff. It works fine over there according to my needs but when i put it my new GM. I dont know what is the problem of ReturnUser, I dont how it is used exactly? Please help!
On Compilation , It gives me the following errors :
Код:
C:\Documents and Settings\Luthra\Desktop\Country Wars\CW V2.5\gamemodes\CW.pwn(1321) : error 017: undefined symbol "ReturnUser" C:\Documents and Settings\Luthra\Desktop\Country Wars\CW V2.5\gamemodes\CW.pwn(1331) : error 017: undefined symbol "giveplayer" C:\Documents and Settings\Luthra\Desktop\Country Wars\CW V2.5\gamemodes\CW.pwn(1331) : error 017: undefined symbol "giveplayer" C:\Documents and Settings\Luthra\Desktop\Country Wars\CW V2.5\gamemodes\CW.pwn(1331) : error 029: invalid expression, assumed zero C:\Documents and Settings\Luthra\Desktop\Country Wars\CW V2.5\gamemodes\CW.pwn(1331) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.