Problem with Y_Bit
#1

When i load in data from file to BitArray everything works fine ,but when i use Bit_Let in a command i get "33554432".
Bit_Vet works fine.
This only happens with one variable. ( All other bit arrays work fine.)

Код:
#define MAX_VEHS 500	 // I tried with lower numbers ,it didn't work
new BitArray:ba_veh_locked<MAX_VEHS>;

// Test command
CMD:test(playerid ,params[]) {
	printf("PRE %i" ,Bit_Get(ba_veh_locked ,0));
	Bit_Let(ba_veh_locked,0);
	printf("LET %i" ,Bit_Get(ba_veh_locked ,0));
        Bit_Vet(ba_veh_locked,0);
	printf("VET %i" ,Bit_Get(ba_veh_locked ,0));
	return 1;
}
with that command i get
0 (or 1)
33554432
0
Reply
#2

Thanks!
Guess it happens when you are not consistent with your programming style.
Reply
#3

You are right ,I have mislead you. I'm sorry.
I do get "33554432" for slot number 25 and not 0.

So, how do i get around that ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)