Replies: 1 comment 1 reply
-
TIC-80 does have bitwise operators, you're just writing it wrong, it is ">>" for right shift, and not ">>>". |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello TIC-80 developers
My question is: can the Lua bit module be used? And if so, how should it be done?
In pico-8 there is the bit '>>>' shift operator, which puts in zero from the left. This '>>>' operator is not available in TIC-80.
But some searching brought up this (standard) Lua module BitwiseOperators.
As I've already used the
math
library, so I thought, thisbit
library, might be also available.But when using
bit.blogic_rshift(n, bits)
there getting this error:attempt to index a nil value (global 'bit')
Also reading about importing modules, but writing the
local bit=require("bit")
did not do the trick.Thanks for your help
Beta Was this translation helpful? Give feedback.
All reactions