Starting a chat miniconsole

Post Reply
Cosine_Omerta
Posts: 3
Joined: Sun Nov 07, 2010 7:27 pm

Starting a chat miniconsole

Post by Cosine_Omerta »

Hi folks. I'm new to mudlet and I am having some problems figuring some things out. I was wanting the chat capture miniconsoles, and was using the code from the post entitled "Tabbed Chat [w/ screenshot+package]" but there are problems.

When I connect to the mud, and then try to call the chatStartup(), nothing happens. I've tried the call in a trigger and an alias. What's weird is if I go into the scripts, look at each of the items under the "Tabbed Chat" group, the Chat item will have a bug message, then if i go to Misc, then back to Chat, it clears up. Then if I call the chatStartup() it works.

I must be missing something with the way the scripts are initialized. Any help or advice would be appreciated.

Thanks for your time.

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Starting a chat miniconsole

Post by Vadi »

Try moving the Chat one below other scripts, since it sounds like it should be loaded after them (based on how you described with the clicking - clicking on a script saves it, which in turn compiles & runs it aka loads).

Cosine_Omerta
Posts: 3
Joined: Sun Nov 07, 2010 7:27 pm

Re: Starting a chat miniconsole

Post by Cosine_Omerta »

The "Tabbed Chat" script group is the only script I have right now. The "Chat" item is the bottom item in that group.

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Starting a chat miniconsole

Post by Vadi »

Alright, the next thing to do then would be to actually look at what the error message is saying.

Cosine_Omerta
Posts: 3
Joined: Sun Nov 07, 2010 7:27 pm

Re: Starting a chat miniconsole

Post by Cosine_Omerta »

The bug that appears after I click it, leave it, and then return to it (it being the "chat" item)
Lua syntax error:[string "---..."]:8: attempt to perform arithmetic on global 'global_width' (a nil value)

The line with the global_width variable is:
global_chatWidth = 0.25 * global_width

Thanks for the help.

Lucky24
Posts: 52
Joined: Sun Sep 12, 2010 1:50 am

Re: Starting a chat miniconsole

Post by Lucky24 »

so, global_width is not defined, or defined with a nil (nothing) value. search for "global_width", and see where the variable is being defined (or not being defined), which should happen before the Chat script where it is being used.

Post Reply