• Hail, we're RedGuides. We want you to play six (yes, 6!) EverQuest characters at once. We have scripts and a friendly community to help, please join our playstyle and say hello! 👋
  • We've added LLM sections to our Terms & Rules and Resource Rules, for everyone's sanity & in-game safety.
    Read more
    a. Do not replace your voice with an LLM. This goes for your posts and your scripts. Drafting and editing with a tool is fine, but don't take you out of what you share.
    b. Do not replace your EQ character's voice with an LLM. We don't want scripts that speak over /ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private.

    Why Does RG Review Scripts?
    Nearly every LLM-written Lua script we see is making your character do impossible things, and rarely in a way that's beneficial to you. We've seen heavy server hammering, /target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs.

    You are welcome to use LLMs as a tool to structure, draft, and edit your work, but please read critically before hitting /lua run

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

Status
Not open for further replies.
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