[JW Lua] Using the 'Optional' code field in RGP Lua

Jacob Winkler jacob.winkler at mac.com
Wed Feb 2 21:01:13 CET 2022


Hey folks, and by folks I may mean mostly Robert Patterson, can anyone offer some advice on how to use the new 'Optional' field in RGP Lua? It seems like the perfect place for a user to store their own custom variables, but I'm having a little difficulty with it.

In the screenshot below, you can see that I am successfully setting up my 'user variable'. However, I want the script to not RELY on the presence of the user variable, I want it to work no matter what. To that end, I set up an if/then that tests to see if my user variable is nil. If it is not nil, then the script will use its value. If it IS nil, then it will use another value that I have hard coded. Seems like it should work... But it doesn't. 


Any suggestions on how this could be set up better?

-Jake
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20220202/47c3e2be/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 64736 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20220202/47c3e2be/attachment-0001.png>


More information about the JWLua mailing list