Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Lua
➜ SetStatus problems.
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| FishOnSpeed
USA (31 posts) Bio
|
Date
| Wed 26 Mar 2008 06:20 PM (UTC) |
Message
| 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.
<triggers>
<trigger
enabled="y"
match="[*][*][*/* * *][*/*](*)"
name="DStracker"
send_to="12"
sequence="100"
>
<send>SetStatus ("[".. %1 .."][".. %2 .."][".. %3 .."/".. %4 .." ".. %5 .." ".. %6 .."][".. %7 .."/".. %8 .."](".. %9 ..")")
</send>
</trigger>
</triggers>
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.
|
~FishOnSpeed | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) 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
|
Message
| 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 | Top |
|
Posted by
| FishOnSpeed
USA (31 posts) Bio
|
Date
| Reply #2 on Wed 26 Mar 2008 08:45 PM (UTC) |
Message
| Nice. Works perfectly, thanks. |
~FishOnSpeed | 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.
11,908 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top