/setskin help!! Errors [rep+]
#1

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.
Reply


Messages In This Thread
/setskin help!! Errors [rep+] - by Ballu Miaa - 15.12.2011, 15:30
Re: /setskin help!! Errors [rep+] - by JackT - 15.12.2011, 15:37
Re: /setskin help!! Errors [rep+] - by JackT - 15.12.2011, 15:55
Re: /setskin help!! Errors [rep+] - by Kostas' - 15.12.2011, 16:04
Re: /setskin help!! Errors [rep+] - by HB - 15.12.2011, 16:11
Re: /setskin help!! Errors [rep+] - by Ballu Miaa - 16.12.2011, 02:52
Re: /setskin help!! Errors [rep+] - by Ballu Miaa - 16.12.2011, 03:08
Re: /setskin help!! Errors [rep+] - by Ballu Miaa - 16.12.2011, 03:19
Re: /setskin help!! Errors [rep+] - by Ballu Miaa - 16.12.2011, 03:24
Re: /setskin help!! Errors [rep+] - by Ballu Miaa - 16.12.2011, 03:32

Forum Jump:


Users browsing this thread: 1 Guest(s)