Packing 2 bit numbers into an int.
I have an array of ints where each int represents 16 blocks,
I am attempting to set and read groups of 2 bits within the int as their own numbers, but am getting numbers I did not put in. (ex. i write a 2 in but it gives me a 3 when reading)
This is how I'm setting the values: (key is the new value)
This is how I'm getting the values:
1 Reply
ā This post has been reserved for your question.
Hey @špothicon! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
š¤ Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.