Skip to content

Common issues

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 here
end

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.

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)

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).

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.