18.04.2012, 13:07
When i compiled my script this error pops up, I don't know what is wrong with this
CMD
Код:
C:\Documents and Settings\JUN.DELL\My Documents\Downloads\Games Installer\Next Revolution Roleplay\Next Revolution Roleplay\gamemodes\NRRP.pwn(54302) : warning 209: function "cmd_setskin" should return a value C:\Documents and Settings\JUN.DELL\My Documents\Downloads\Games Installer\Next Revolution Roleplay\Next Revolution Roleplay\gamemodes\NRRP.pwn(54303) : error 010: invalid function or declaration C:\Documents and Settings\JUN.DELL\My Documents\Downloads\Games Installer\Next Revolution Roleplay\Next Revolution Roleplay\gamemodes\NRRP.pwn(54305) : error 021: symbol already defined: "SendClientMessageEx" C:\Documents and Settings\JUN.DELL\My Documents\Downloads\Games Installer\Next Revolution Roleplay\Next Revolution Roleplay\gamemodes\NRRP.pwn(54307) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors.
Код:
CMD:setskin(playerid, params[]) { if (PlayerInfo[playerid][pAdmin] >= 3) { new string[128], giveplayerid, skinid; if(sscanf(params, "ud", giveplayerid, skinid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /setskin [player] [skinid]"); if(IsPlayerConnected(giveplayerid)) { if(GetPlayerSkin(giveplayerid) == skinid) { SendClientMessageEx( playerid, COLOR_WHITE, "The player you're trying to change skins of already is using the skin you're trying to set." ); } else { PlayerInfo[giveplayerid][pChar] = skinid; PlayerInfo[giveplayerid][pModel] = skinid; format(string, sizeof(string), "Your skin has been changed to ID %d by Administrator %s.", skinid, GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); format(string, sizeof(string), "You have given %s skin ID %d.", GetPlayerNameEx(giveplayerid), skinid); SendClientMessageEx(playerid, COLOR_WHITE, string); SetPlayerSkin(giveplayerid, PlayerInfo[giveplayerid][pChar]); } } else { SendClientMessageEx(playerid, COLOR_GREY, "Invalid skin ID!"); } } } else { SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!"); } return 1; }