Problem with Y_Bit - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread:  Problem with Y_Bit (
/showthread.php?tid=570713)
 
Problem with Y_Bit - 
detter -  12.04.2015
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
Re: Problem with Y_Bit - 
detter -  12.04.2015
Thanks!
Guess it happens when you are not consistent with your programming style.
Re: Problem with Y_Bit - 
detter -  12.04.2015
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 ?