-
Notifications
You must be signed in to change notification settings - Fork 0
1.1 lua files and folders
I would like to start with the absolute basics that do not contribute at all to the knowledge of programming:
Basically, all scripts must be located in a subdirectory named "scripts".
This directory is usually located on the data volume/"drive" named "NAND" or "RADIO" for transmitters with larger NAND storage, and on the SD card for transmitters with smaller NAND, such as the X20/X20S.
(For the former, the user can decide whether to offload the scripts to the SD card.)
Lua scripts are identified by the suffix ".lua" (uncompiled) or ".luac" (compiled).
A simple script that exists solely as a single file can be placed directly in the "/scripts" folder with a freely chosen filename.
Alternatively, a subfolder can be created, but then the file MUST be named "main.lua" or "main.luac"!
I generally recommend the subfolder variant for the sake of clarity.
The folder should be given a clearly identifiable name.
As always, it is important to adhere to naming conventions for Ethos (pay attention to maximum file length, special characters, etc.).