Warning Symbol is never used? - 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)
+--- Thread: Warning Symbol is never used? (
/showthread.php?tid=349109)
Warning Symbol is never used? -
Vero - 07.06.2012
Hey guys hit a problem and I'm not seeing how to fix it. I know the script sees the symbol as not used, but I can't see why, can someone else take a quick look?
pawn Код:
warning 203: symbol is never used: "randcure"
pawn Код:
new randcure[10] = {
{pickup}, {pickup2}, {pickup3},{pickup4},{pickup5},
{pickup6},{pickup7}, {pickup8},{pickup9},{pickup10}
};
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
new RandCurePickup = random(sizeof(randcure));
if(pickupid == RandCurePickup)
{
GivePlayerMoney(playerid,10000); // Just for the test
SendClientMessage(playerid, COLOUR_RED, "JACKPOT" );
}
return 1;
}
Re: Warning Symbol is never used? -
Calgon - 07.06.2012
You're not using the symbol. You should get rid of it if you don't need it, but if you really do need it and just want to get rid of the problem using a temporary fix, then you can use #pragma unused.
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
new RandCurePickup = random(sizeof(randcure));
#pragma unused randcure
if(pickupid == RandCurePickup)
{
GivePlayerMoney(playerid,10000); // Just for the test
SendClientMessage(playerid, COLOUR_RED, "JACKPOT" );
}
return 1;
}
Re: Warning Symbol is never used? -
Vero - 08.06.2012
Thank you.