BitFields?
#1

Does Pawn have support for bitfields.

I want to keep a status array thing and it would be major convenience to be able to binary operations directly on that array. Will also save a lot of memory.. Help please?

basically I wan't to be able to keep an array of bits and manip them directly.
Considering and integer is 4/8 bytes..so much waste
Reply
#2

Check this out:
[Tutorial] An in-depth look at binary and binary operators.
Binary - SA-MP Wiki
Reply
#3

Thanks for the link, but I wanted something that would allow me to create/manip bit arrays. I know 8 is 0100 and I know the theory behind binary maths. That's not the problem.
Say i had number of yes/no player variables- I want to store them in a bit array. I can't know the value in advance so i can't just magic number them
Reply
#4

Have you tried rBits? Might be what you are looking for, take a look: https://sampforum.blast.hk/showthread.php?tid=275142
Reply
#5

Thanks, my friend
Reply
#6

https://sampforum.blast.hk/showthread.php?tid=591223
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)