SetStatus not updating with variables

Posted by Rahrah on Wed 26 Jun 2024 09:29 AM — 3 posts, 6,976 views.

#0
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
Amended on Wed 26 Jun 2024 10:01 AM by Rahrah
USA Global Moderator #1
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.
Amended on Wed 26 Jun 2024 12:55 PM by Fiendish
#2
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.