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,
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.
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...
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.
Trigger Scripts is the setup category - 1:46 into this video show the setting:
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!!!
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. :-)