PDA

View Full Version : Warning Symbol is never used?


Vero
07/06/2012, 09:36 PM
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?

warning 203: symbol is never used: "randcure"

new randcure[10] = {
{pickup}, {pickup2}, {pickup3},{pickup4},{pickup5},
{pickup6},{pickup7}, {pickup8},{pickup9},{pickup10}
};

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;
}

Calgon
07/06/2012, 10:02 PM
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.


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;
}

Vero
08/06/2012, 02:15 PM
Thank you.