[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  SetStatus problems.
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

SetStatus problems.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Posted by FishOnSpeed   USA  (31 posts)  [Biography] bio
Date Wed 26 Mar 2008 06:20 PM (UTC)
I'm trying to send my prompt to the status line at the bottom of the screen. My trigger fires fine and all that then I get an error.

Heres the error.
Compile error
World: darkeningsun
Immediate execution
[string "Trigger: DStracker"]:1: ')' expected near ':'

Heres the trigger.
match="[*][*][*/* * *][*/*](*)"
<send>SetStatus ("[".. %1 .."][".. %2 .."][".. %3 .."/".. %4 .." ".. %5 .." ".. %6 .."][".. %7 .."/".. %8 .."](".. %9 ..")")

The only place in the prompt where a : shows up is in the time part. Can I not send something with numbers and symbols to the status line? I.e. 2:30am Because it works fine if I take the time out.

[Go to top] top

Posted by Nick Gammon   Australia  (21,675 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Wed 26 Mar 2008 08:39 PM (UTC)

Amended on Wed 26 Mar 2008 08:40 PM (UTC) by Nick Gammon

Have a look at http://mushclient.com/faq point 32.

Say in your example that %1 is a time. Let's see how that will look:

SetStatus ("[".. 19:32 .."][" ... etc ... )

This will fail because it won't accept 19:32 as a variable name or number.

String values in wildcards need to be quoted like this:

SetStatus ("[".. "%1" .."][".. "%2" .."][".. "%3" .."/".. "%4" .." ".. "%5" .." ".. "%6" .."][".. "%7" .."/".. "%8" .."](".. "%9" ..")")

Of course that looks ridiculously complex, so just simplify it like this:

SetStatus ("[%1][%2][%3/%4 %5 %6][%7/%8](%9)")

You already have a quoted string - things like %1 are not variables, they are simply substituted into the string literally.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by FishOnSpeed   USA  (31 posts)  [Biography] bio
Date Reply #2 on Wed 26 Mar 2008 08:45 PM (UTC)
Nice. Works perfectly, thanks.

[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum

[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]