gmcp access fails without error

Post Reply
Slayd
Posts: 102
Joined: Mon Jul 25, 2011 4:57 am

gmcp access fails without error

Post by Slayd »

I have a lua script Variables, that initializes general flags, tables, etc that are not tied to a particular skill set.

When I log in to Achaea, I find that anything in the script after setting a variable to a gmcp value is never reached so the variables are not set until I manually resave the script file after logging in.

I suppose the gmcp call fails because the gmcp channel acquisition is not complete at the time the script file is evaluated on login.

Mudlet does not report an error. The call just fails silently and no further processes on the script occurs.

I don't see this documented. Obviously, I can set up a temp trigger that initializes variables that require a gmcp value after some interval of time passes.

Should mudlet establish the gmcp connection (if gmcp is enabled) BEFORE the lua scripts are loaded?

Erant
Posts: 12
Joined: Fri Feb 27, 2015 2:02 am

Re: gmcp access fails without error

Post by Erant »

Scripts are loaded up before GMCP, and I doubt that'll be changing. I'd recommend putting your script into a function, and running the function once you've logged into the MUD, probably easiest via a trigger.

Slayd
Posts: 102
Joined: Mon Jul 25, 2011 4:57 am

Re: gmcp access fails without error

Post by Slayd »

Thanks for the info. I will do as you suggest

Post Reply