• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Question - Why does mq.TLO.Window(<window name>).DoClose() print nil on the MQ console?

Status
Not open for further replies.
Joined
Sep 27, 2020
RedCents
6,554¢
Title sums up the jist of the post. Interested in knowing the thought process behind reporting 'nil' to the MQ console. Using the command line (e.g., /windowstate spellbookwnd close results in a message like Windows 'My Spell Book' is now closed. (even if there isn't a window to close).
 
Solution
/windowstate spellbookwnd close

is a command. it doesn't return anything. It executes a routine that does things and then prints the message to output, which is captured by the chat window or console, or wherever you happen to see it.

mq.TLO.Window("foo").DoClose() is a function that does a thing. it prints no message and has no return value because in macro script, methods have no return values.

if you print what it returns, it'll be nil, because a function with no return value returns nil.
/windowstate spellbookwnd close

is a command. it doesn't return anything. It executes a routine that does things and then prints the message to output, which is captured by the chat window or console, or wherever you happen to see it.

mq.TLO.Window("foo").DoClose() is a function that does a thing. it prints no message and has no return value because in macro script, methods have no return values.

if you print what it returns, it'll be nil, because a function with no return value returns nil.
 
Last edited:
Solution
That's what I was missing. I was testing with /Lua parse and didn't expect to see a message. Inside a script nothing shows up on the console.

Thanks.
 
Question - Why does mq.TLO.Window(<window name>).DoClose() print nil on the MQ console?
Status
Not open for further replies.

Users who are viewing this thread

Back
Top
Cart