Common issues
A global is nil
Section titled “A global is nil”A gated capability that was not granted is not installed: the global is nil and indexing it is a normal Lua error. http, websocket, input, reflect and, on cocos builds, ffi/objc/cocos are gated. A loose local script on a dev build is granted every group; a marketplace bundle gets exactly what its manifest.json lists. Test before use:
if http then -- safe to call http.get hereendThe row shows error:
Section titled “The row shows error:”An error in the top level refuses the load. An error in an event callback closes the script and stops it running until you load it again. Read the message in the row; it is the raw Lua error.
Nothing draws
Section titled “Nothing draws”renderer.* only draws inside the paint event. Register it and draw there:
client.set_event_callback("paint", function() renderer.text(15, 15, 255, 255, 255, 255, nil, 0, "hello")end)The script was refused at load
Section titled “The script was refused at load”A source file larger than 1 MiB is refused. Only text source compiles; bytecode is never accepted, and there is no way to load code at run time (load, loadfile, dofile, require for arbitrary files and string.dump are all removed).
A game function returned false
Section titled “A game function returned false”The game actions (queueing, forfeiting, overriding a shot) return false when they are not allowed right now — not in a match, not your turn, no licence. That is not an error; check the return and try again when the state allows it.