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.
Entire forum
➜ MUSHclient
➜ Lua
➜ SetStatus not updating with variables
SetStatus not updating with variables
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Rahrah
(2 posts) Bio
|
Date
| Wed 26 Jun 2024 09:29 AM (UTC) Amended on Wed 26 Jun 2024 10:01 AM (UTC) by Rahrah
|
Message
| Hi!
Lurker here since I started to mud again. Mush been my choice of client, but now I'll start with a problem I cant find any info on.
SetStatus is not updating any variables other way than when I do the whole /SetStatus line again? Is this intentional and I should have SetStatus on the trigs etc. that affect those variables? Or is there something to update SetStatus otherwise.
/SetStatus ("TARGET = ", GetVariable("target"), "| cTRANCE: ", GetVariable("trance"), "| RUSH: ", GetVariable("adrenaline_rush"), "| PREF: ", GetVariable("monk_pref"))
is what I have on my status and everything works, but only if I type that.
EDIT: In real time figuring this out after all, but still might need guide on the way. So now I have an alias which sets the bar(not the program one) right, should I make it do this on timer or put this on varibles that affecting the status
EDIT2: Yeah, my solution was to make a timer that sends alias that sends the whole set as it refreshes the variables. What do you think of the sollution?
thanks
rah | Top |
|
Posted by
| Fiendish
USA (2,533 posts) Bio
Global Moderator |
Date
| Reply #1 on Wed 26 Jun 2024 12:54 PM (UTC) Amended on Wed 26 Jun 2024 12:55 PM (UTC) by Fiendish
|
Message
|
Quote: SetStatus is not updating any variables other way than when I do the whole SetStatus line again?
This is correct. The documentation using multiple arguments and variable names is a bit misleading/confusing there. SetStatus literally only takes some text and puts it on top of the status bar area replacing whatever text was there before. It doesn't actually understand variables at all. In order to update the status with a complex collection of many variables, you must build the entire text again each time.
Quote: Yeah, my solution was to make a timer that sends alias that sends the whole set as it refreshes the variables. What do you think of the sollution?
I would probably make the timer do the work itself instead of asking an alias to do it, but you got it to work the way you did, which is good success. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Rahrah
(2 posts) Bio
|
Date
| Reply #2 on Thu 27 Jun 2024 11:28 AM (UTC) |
Message
| yes, put the /setstatus to timer, no need to have alias do it(it was from debugging the works of /setstatus and just felt lazy east :D)
Thanks alot for explaining and optimization. | 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.
1,405 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top