14.01.2014, 12:21
Quote:
You whole code is completely.... terribly.... wrong.How can you carry out operations outside a function block?You need to first put those assignments and format,etc inside a function block where it can get executed.
Does that in...OnPlayerDeath mean its inside the callback { }??Or that's a comment in your code? |
Quote:
I know it
![]() But MAX_BAGS should work like MAX_PLAYERS no ? So bagid is the same as playerid, but for the bags, and it not depends of players, but of bags, isn't ? I just ask questions, I don't know how to solve this problem, and how does it was created :3 |
'bagid' isn't working because you do not have any variable named 'bagid' holding any value (The bagid), you should code it so you'll have a function which gets the bagid you need or something, then you COULD do
pawn Код:
#define bagid return GetBagID();
pawn Код:
new bagid = -1;
*code to get the bagid you need*
*use bagid where ever you want (As long as the variable is in the same function/callback/whatsoever)*
pawn Код:
OnPlayerCommandText(playerid, cmdtext[])
{
// code
}
or ZCMD:
CMD:command(playerid, params[])
{
// code
}
Best regards,
Jesse