02.10.2015, 13:46
Hey! I want to make a command that changes the players skin, but I get the following error messages:
Note: I kind of improvised the code cause I dont really know how to script properly
And this is the code:
Thanks in beforehand.
Note: I kind of improvised the code cause I dont really know how to script properly
Код:
C:\Users\John\Desktop\SA-MP servers\DM Server\gamemodes\bare.pwn(182) : error 001: expected token: "-identifier-", but found "[" C:\Users\John\Desktop\SA-MP servers\DM Server\gamemodes\bare.pwn(184) : error 017: undefined symbol "yellow" C:\Users\John\Desktop\SA-MP servers\DM Server\gamemodes\bare.pwn(185) : error 017: undefined symbol "red" C:\Users\John\Desktop\SA-MP servers\DM Server\gamemodes\bare.pwn(186) : error 017: undefined symbol "Jstring" C:\Users\John\Desktop\SA-MP servers\DM Server\gamemodes\bare.pwn(186) : error 017: undefined symbol "Jstring" C:\Users\John\Desktop\SA-MP servers\DM Server\gamemodes\bare.pwn(186) : error 029: invalid expression, assumed zero C:\Users\John\Desktop\SA-MP servers\DM Server\gamemodes\bare.pwn(186) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 7 Errors.
Код:
CMD:skin(playerid,params[]) { new playerState = GetPlayerState(playerid); if(playerState == PLAYER_STATE_SPAWNED) { new skinid,[001]; if(sscanf(params, "i", skinid)) return SendClientMessage(playerid, yellow, "Usage: /skin [skin ID]") ; if(skinid < 0 || skinid > 299) return SendClientMessage(playerid, red, "Invaild skin ID!"); format(Jstring,sizeof(Jstring),"You have set your skin ID to %d.", skinid); SendClientMessage(playerid,yellow,Jstring); [playerid][Skin] = skinid; SetPVarInt(playerid,"Useskin",1); return SetPlayerSkin(playerid, skinid); } else return ShowMessage(playerid, red, 1); }