ButtKoWitz
Member
New to Lua and MQ so be patient
...
I'm a little confused about when to include, or not, the final parenthesis when building an mq.TLO... call. The Lua Scripting in MacroQuest guide offers some info towards this, and definitely says "append () to the end to finally bring the result into lua"
(specifically here: https://docs.macroquest.org/lua/#tlo-bindings ). But where I'm confusing myself is when I'm looking over the example Lua scripts I see sometimes the mq.TLO... calls have extra ending parens, and sometimes not (most times not).
Two example scripts that come with default install of MQ) that have me confused are:
PackageMan.Lua ...
Line 28
Are the final parens necessary, as ...Dir('modules') seems to me to be the closing set.
The other confusing call is:
autoassist.Lua
Line 5
Umm o.k. But why am I'm noting the "lack of parens here"?
Thanks!
...I'm a little confused about when to include, or not, the final parenthesis when building an mq.TLO... call. The Lua Scripting in MacroQuest guide offers some info towards this, and definitely says "append () to the end to finally bring the result into lua"
(specifically here: https://docs.macroquest.org/lua/#tlo-bindings ). But where I'm confusing myself is when I'm looking over the example Lua scripts I see sometimes the mq.TLO... calls have extra ending parens, and sometimes not (most times not).
Two example scripts that come with default install of MQ) that have me confused are:
PackageMan.Lua ...
Line 28
Code:
local cliInstallPath = mq.TLO.Lua.Dir('modules')() .. '\\luarocks'
The other confusing call is:
autoassist.Lua
Line 5
Code:
local groupAssist = function () return mq.TLO.Me.GroupAssistTarget end -- Note the lack of parentheses here
Thanks!

