Varsuuk
March 12th, 2019, 00:40
[SOLVED]
Is there any things to be aware of or particularly careful about putting Lua code in an .lua file referenced in windowclass or control's <script> block vs putting it all inline in the block?
I know you get better errors in .lua files
You can see immediately what is going on when it is inline (especially for very short methods and events)
Any other pro-cons in either direction? I figure thoughts and styles evolve over time and what FG devs prefer now might have changed from what it was when some rulesets were first coded.
Thanks guys :)
(PS - if this answer is more than trivial, perhaps it should be spelled out in the https://www.fantasygrounds.com/modguide/scripting.xcp page. The mechanics are, but unless that is it - no other things to consider, the pro/cons are not compared.)
Is there any things to be aware of or particularly careful about putting Lua code in an .lua file referenced in windowclass or control's <script> block vs putting it all inline in the block?
I know you get better errors in .lua files
You can see immediately what is going on when it is inline (especially for very short methods and events)
Any other pro-cons in either direction? I figure thoughts and styles evolve over time and what FG devs prefer now might have changed from what it was when some rulesets were first coded.
Thanks guys :)
(PS - if this answer is more than trivial, perhaps it should be spelled out in the https://www.fantasygrounds.com/modguide/scripting.xcp page. The mechanics are, but unless that is it - no other things to consider, the pro/cons are not compared.)