25.11.2013, 11:16
You have a major error in there:
I am sure you wanted to set the variables to 0.
Read in this (https://sampforum.blast.hk/showthread.php?tid=318307) topic that setting to constants in enums sets their POSITION and not their value. Hence gOwner and gAttacked would be BOTH at the position 0 which is not good.
Example - try running this code here. (http://slice-vps.nl:7070/)
It returns "0, 0" and not "5, 10".
pawn Код:
enum CaptureInfo
{
gAttacked = 0,
gOwner = 0,
}
Read in this (https://sampforum.blast.hk/showthread.php?tid=318307) topic that setting to constants in enums sets their POSITION and not their value. Hence gOwner and gAttacked would be BOTH at the position 0 which is not good.
Example - try running this code here. (http://slice-vps.nl:7070/)
pawn Код:
#include <a_samp>
enum r_EXAMPLE
{
my_position_is_5 = 5,
my_position_is_10 = 10
}
new rEnum[ 1 ][ r_EXAMPLE ];
main()
{
printf(" %i, %d ", rEnum[ 0 ][ my_position_is_5 ], rEnum[ 0 ][my_position_is_10] );
}

