Skin system
#1

Код:
if(!strcmp(cmd, "/my skin", true))
	{
		myskin = strtok(cmdtext, idx);
		if (!strlen(myskin)){
        return 1;
		}
		if ((strval(myskin) < 0) || (strval(myskin) > 299) || IsInvalidSkin(strval(myskin)))
return SendClientMessage(playerid, COLOR_BRIGHTRED, "Invalid Skin");
		SetPlayerSkin(playerid, strval(myskin));
		skin[playerid] = 1;
		return 1;
	}C:\Documents and Settings\Administrateur\Bureau\SaR\gamemodes\Test2.pwn(1367) : error 017: undefined symbol "IsInvalidSkin"
Reply
#2

For people to help you. You need to say what the problem is... and post the code in
Код:
Script here
Reply
#3

Just see that error in code

}C:\Documents and Settings\Administrateur\Bureau\SaR\gamemodes\Test2 .pwn(1367) : error 017: undefined symbol "IsInvalidSkin"
Reply
#4

pawn Код:
IsInvalidSkin(SkinID)
{
    #define MAX_BAD_SKINS 22
    new InSkin[MAX_BAD_SKINS] = {
    0, 3, 4, 5, 6, 8, 42, 65, 74, 86,
    119, 149, 208,  273, 289};
    for (new i = 0; i < MAX_BAD_SKINS; i++) {
    if (skinid == InSkin[i]) return true;}
    return 0;
}
Reply
#5

pawn Код:
#define IsInvalidSkin
?
Reply
#6

Quote:
Originally Posted by jonnyboy
Посмотреть сообщение
pawn Код:
#define IsInvalidSkin
?
LMAO sure that'll fix it hehe. (not realy) jonnyboy if you do that to get rid of errors your code fails.
Reply
#7

To fix:
pawn Код:
stock IsValidSkin(SkinID)
{
    if((SkinID == 0)||(SkinID == 7)||(SkinID >= 9 && SkinID <= 41)||(SkinID >= 43 && SkinID <= 64)||(SkinID >= 66 && SkinID <= 73)||(SkinID >= 75 && SkinID <= 85)||(SkinID >= 87 && SkinID <= 118)||(SkinID >= 120 && SkinID <= 148)||(SkinID >= 150 && SkinID <= 207)||(SkinID >= 209 && SkinID <= 264)||(SkinID >= 274 && SkinID <= 288)||(SkinID >= 290 && SkinID <= 299)) return true;
    else return false;
}

And it's really annoying people posting their errors, since the reason of error is on the error title --..
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)