please help guyz
#1

hey guyz i just got 4 errors in my vip system so would u plz fix it
line:
pawn Код:
if(!IsValidSkin(skin)) return SendClientMessage(playerid,red,"[ERROR]Invalid skinID");
errors:
Код:
V.I.P-System.pwn(198) : error 012: invalid function call, not a valid address
V.I.P-System.pwn(198) : warning 215: expression has no effect
V.I.P-System.pwn(198) : error 001: expected token: ";", but found ")"
V.I.P-System.pwn(198) : error 029: invalid expression, assumed zero
V.I.P-System.pwn(198) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
so would u plz help me cuz im stuck with em' i tried to fix them by :
pawn Код:
new IsValidSkin[MAX_PLAYERS];
but it didn't work out so plz fix them !!!!!
Reply
#2

Did you actually create the stock or callback? Or just called it a variable and decided that a variable works like a function..
Reply
#3

delete this variable:
pawn Код:
new IsValidSkin[MAX_PLAYERS];

Replace for:
pawn Код:
#define IsInvalidSkin(%0) ((%0 ==  3 || %0 ==  4 || %0 ==  5 || %0 ==  6 || %0 ==  7 || %0 ==  8 || %0 ==  42 || %0 ==  65 || %0 ==  74 || %0 ==  86 || %0 ==  119 || %0 ==  149 || %0 ==  208 || %0 ==  268 || %0 ==  273 || %0 ==  289)?(true):(false))
Reply
#4

maybe it work
i'll try thanxx TheGarfield
Reply
#5

Or use the actual stock:

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;
}
pawn Код:
if(!IsValidSkin(SkinID)) return SendClientMessage(playerid, 0xFF030DAA, "Invalid Skin ID");
Reply
#6

sorry guyz didn't work out
here's the code
pawn Код:
dcmd_myskins(playerid, params[])
{
    if(dini_Int(PFile(playerid),"VipMember")<2)return SendClientMessage(playerid, red, "[ERROR]You must became Silver member to use this command");
    new skin;
    new IsValidSkin;
    if(sscanf(params,"i",skin)) return SendClientMessage(playerid,red,"[ERROR]USAGE: /myskins [SkinID]");
    if(!IsValidSkin(skin)) return SendClientMessage(playerid,red,"[ERROR]Invalid skinID");
    SetPlayerSkin(playerid,skin);
    return 1;
 }
and here's the errors:
Код:
V.I.P-System.pwn(199) : warning 219: local variable "IsValidSkin" shadows a variable at a preceding level
V.I.P-System.pwn(201) : error 012: invalid function call, not a valid address
V.I.P-System.pwn(201) : warning 215: expression has no effect
V.I.P-System.pwn(201) : error 001: expected token: ";", but found ")"
V.I.P-System.pwn(201) : error 029: invalid expression, assumed zero
V.I.P-System.pwn(201) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Please HELP ANYONE
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)