CelX scripts can be anywhere. They must not depend on any external lua files.
The lua files accessed by ScriptedOrbit and ScriptedRotation must be in the subdirectory named celxx which must be in the same directory as the .SSC catalog.
Errors in ScriptedOrbit and ScriptedRotation files usually crash Celestia instead of displaying error messages, so I usually debug their functions in CelX scripts first.
All of the code in a file defining a ScriptedOrbit (or ScriptedRotation) is executed when the ScriptedOrbit (or ScriptedOribit) is first encountered while Celestia is loading the SSC catalog. After that, only the function specified in that ScriptedOrbit (or ScriptedRotation) is called each time Celestia refreshes the screen.
When showing code in a post, it's best to surround it with the BBCode labels [ code] and [ /code] (without the spaces). It'll look like this:
One way to attach a file to a post is
1. select the button "Full Editor & Preview" (below the quick-edit pane)
2. select the button "Filename:" "Browse" (below the new editing pane)
3. find and select the desired zip file (on your local computer)
4. Optionally add a "File comment"
5. select the button "Filename:" "Add the file"
6. select the button "Preview" to see how your message looks, including the attachment
7. select the button "Submit" to post the message with the attachment