How do I make Lua.Run() ignore commented lines?
-
- Posts: 20
- Joined: Mon Jan 21, 2019 5:29 pm
How do I make Lua.Run() ignore commented lines?
I noticed myself tweaking inspector lua fields alot, sometimes I just need to temporarily comment out some lua lines to do a quick test (using double slash '//'), then remove the double slash so the code would register again. But Lua.Run() doesn't seem to handle this behaviour, so I have been copying the lua code to some where else, then paste it back afterwards. I wonder are
Re: How do I make Lua.Run() ignore commented lines?
Hi,
In Lua, use '--' instead of '//'. Example:
In Lua, use '--' instead of '//'. Example:
Code: Select all
Variable["foo"] = 42; -- Comment: set foo to 42.
-
- Posts: 20
- Joined: Mon Jan 21, 2019 5:29 pm
Re: How do I make Lua.Run() ignore commented lines?
that's super useful! thanks!
Re: How do I make Lua.Run() ignore commented lines?
Glad to help!
Somewhat unrelated: You can also use C# style // comments in Sequence fields:
Somewhat unrelated: You can also use C# style // comments in Sequence fields:
Code: Select all
Camera(Closeup); // Cut to a closeup of the speaker.
Camera(Wide,,3); // Then zoom out to a wide shot over 3 seconds.