Connect To The Controller (LCC.connect)
Signature
ok = LCC.connect()
Parameters
- none
Returns
- ok
Boolean. Returnstruewhen the connection and version check succeed; otherwisefalse.
Notes
Loads configuration, completes initialisation, and reports the script state to the controller.
If the module version mismatches, it shows a prompt, downloads the latestLCC.lua, and hot-updates automatically.
On success caches the config and registers an exit callback to reportis_running = falsewhen the script terminates.
When no address was set viaLCC.set_api_url()and the script is not launched by the controller, the function returnsfalseimmediately.
Example
if not LCC.connect() then
error("Unable to connect to the controller")
end