please help guyz - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: please help guyz (
/showthread.php?tid=258691)
please help guyz -
MBX97 - 31.05.2011
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 !!!!!
Re: please help guyz -
Steven82 - 31.05.2011
Did you actually create the stock or callback? Or just called it a variable and decided that a variable works like a function..
Re: please help guyz -
TheGarfield - 01.06.2011
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))
Re: please help guyz -
MBX97 - 01.06.2011
maybe it work
i'll try thanxx TheGarfield
Re: please help guyz -
Snipa - 01.06.2011
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");
Re: please help guyz -
MBX97 - 01.06.2011
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