Hi everyone!
I always thought I know my way around various programming and scripting languages but I can't seem to get even the most simple Lua script off the ground...
To get started I want to simply trigger a timeline at StartUp.
What I did:
- Set trigger to "StartUp"
- Set trigger's "Action" to "Run Script"
- Make "New Script"
- Use script "get_timeline(2):start()" to start timeline 2
- Press "Build" to compile the code
I try to simulate the project - no result
I upload to the project to the Mosaic controller - no result
What am I missing? A special Lua script firmware uploaded to the controller? I read through several Lua trigger documents on ETC's web-site but nothing mentions anything special.
How can I get this simple one line script off the ground?
Thank you for your help in advance,
Erwin
Assuming you are copying and pasting the error message, you have a typo in the function call.
Your error reports get_timeliMe but the function is get_timeliNe (note: Capitalization for emphasis, but would…
Anything to procrastinate here.
What version software are you running?
Make sure the “New Script” is associated with the startup trigger.
Do the logs show the script is attempting to run? You may need to increase the log level.
Test your script with a new Soft Trigger and fire from the web interface. Does it run then? Logs?
Additional query to above question:
Using the Web Interface I looked up the trigger log and this is what I found:
ACTION Run Script: Failed to run script [string "script"]:1: attempt to call a nil value (global 'get_timelime'
It looks like the command "get_timelime" is not defined...
2.6.3
get_timeline(num):start()
That is the correct format.
I am going from a vague guess - but there could be an enable Lua Script in the setup tab... I am away from my PC at the moment.
Yes the "New Script" is associated with the startup trigger
I made a new Soft Trigger and initiated it from the web interface. Same nil result. Log states the same as before:
"ACTION Run Script: Failed to run script [string "script"]:1: attempt to call a nil value (global 'get_timelime')"
Trigger Scripts is the setup category - 1:46 into this video show the setting:
m.youtube.com/watch
Your error reports get_timeliMe but the function is get_timeliNe (note: Capitalization for emphasis, but would be incorrect in usage)
HA HA HA!
You are correct Tracy!!!
I simple typo torpedoed the script. I fixed the type and now it works
BUT: Why does "Build" not flag the error? It stated "Build was successful" when I compiled the script....
Thank you so much!!!
Just mean Jason
Because you can script just about anything you want. The handler is just looking for native mosaic stuff. Otherwise it's only looking for syntax errors. You could have a function that might know what a timeLIME is. :-)