| attempt to call a nil value | The function does not exist (typo or wrong namespace). | Check the spelling in this page. |
| attempt to index a nil value | entity.get_local_player() (or a lookup) returned nil. | Guard it: local me = entity.get_local_player() if not me then return end. |
| drawing is only available inside paint / present_queue callbacks | A render.* call outside a drawing callback. | Draw from events.present_queue, events.menu or a custom control. |
| the user command is only available inside create_move callbacks | cmd used outside create_move. | Keep command code inside events.create_move. |
| the script took too long | A callback ran longer than 300 ms. | Optimize loops, cache results, spread work over frames with Delay. |
| unexpected symbol near '|' (or '&', '~') | Bitwise operators do not exist in LuaJIT. | Use bit.bor, bit.band, bit.bnot. |
| attempt to index global 'ffi' (a nil value) | The script uses the FFI but Allow Lua FFI is off (default). | Turn it on in the Settings tab, or use memory.* / entities.* which need no FFI. |
attempt to index field 'open' (a nil value) on io | io.open, io.lines, os.execute and friends are removed. | Use file.read, file.write, file.append, file.list. |
| bytecode loading is disabled | A precompiled chunk was passed to load / loadstring. | Load readable Lua source. |
| a field reads a strange value | The schema had no type and the name prefix guessed wrong. | Read it with accessor:get_as("uint8") or memory.read. |