13.01.2012, 09:14
pawn Код:
stock RandomGift(playerid)
{
new randomgift = random(MAX_RANDOM_GIFTS) + 1;
switch (randomgift)
{
case 1:
{
//
}
case 2:
{
//
}
case 3:
{
//
}
}
return 1;
}
stock RandomGift(playerid)
{
new randomgift = random(MAX_RANDOM_GIFTS) + 1;
switch (randomgift)
{
case 1:
{
//
}
case 2:
{
//
}
case 3:
{
//
}
}
return 1;
}
Thats just because you didnt use the 'playerid'. If you gonna give a random gift to someone, for example 500 gold, youre using the 'playerid' and wont get this warning anymore. |
Can I ask an honest question - what about that warning message was confusing or misleading? I've always seen them as quite self-explanatory, the message says that a variable is never used and in fact yes, that variable is never used. It's interesting from a language development point of view to know why people don't understand things (although I didn't make PAWN).
|