Hi Tony!
Is it possible to execute if/else statements in a Lua.Run() call?
I tried checking in the Lua Console if I could run something like "if Variable['myVar'] == 100 then Variable['myOtherVar'] = true" and "if (Variable['myVar'] == 100) Variable['myOtherVar'] = true" but to no avail.
No big deal if it's not possible, but if there was a way to do so I could greatly benefit it
Thanks in advance!
if/else statements in Lua.Run()?
Re: if/else statements in Lua.Run()?
Hi,
Yes, you can even send entire Lua programs to Lua.Run() if you want. Lua's if..then..end syntax is a little different from C#:
Yes, you can even send entire Lua programs to Lua.Run() if you want. Lua's if..then..end syntax is a little different from C#:
Code: Select all
if (Variable['myVar'] == 100) then Variable['myOtherVar'] = true end