|
edb6377 Magician
Joined: 29 Nov 2005 Posts: 482
|
Posted: Wed Jun 14, 2006 3:46 am
Simplified Status Window Example |
Doesnt work - Stores %4 in the STW although its set and you can see it
Code: |
This is called through alias
#ALIAS TESTADD {#STW {%4} {Extender} {Tracker}}
|
Works Wonderfully - Stores the exact string in the stw no problems
Code: |
#STW {~<Color Green~>TEST~</COLOR~> @hp} {EXTENDER} {TRACKER}
|
EXAMPLE OF WHAT I AM TALKING ABOUT
The required syntax of #STW being #STW {INPUT} {CLASS} {NAME}
makes it impossible to dynamically do status windows via aliases. Reason being the {INPUT} requires the {} around it. which the new syntax settings will immediate throw up an error if you try #STW %4 etc. with no {} by showing you the code on the line
#STW <COLOR GREEN>HP:</COLOR>{test} {Extender} {Tracker}
and attempt to get around this by typing
testadd name 1 4 {{~<COLOR GREEN~>HP:~</COLOR~>@HP}}
testadd name 1 4 {"{"~<COLOR GREEN~>HP:~</COLOR~>@HP"}"}
etc all miss because its already decided its invalid in the alias command itself due to the missing braces.
Error compiling script:
syntax error
Why i like the compiler tab so much
With braces
0000 LINE 0 ; #STW {%4} {Extender} {Tracker}
0012 PUSHSTRLOC 0028
0020 JUMP 0048
0028 STR '%4'
0048 ARGSTR %4
0060 PUSHSTRLOC 0076
0068 JUMP 0100
0076 STR 'Extender'
0100 ARGSTR Extender
0116 PUSHSTRLOC 0132
0124 JUMP 0156
0132 STR 'Tracker'
0156 ARGSTR Tracker
0172 CMD stwin (3)
so it appears its compile testing before its ran. while its faster i think it has produced results unexpected through CMUD and hopefully this info will help.
If you guys figure out something i havent tried that works feel free to let me know id love to hear it. |
|
|
|
Rainchild Wizard
Joined: 10 Oct 2000 Posts: 1551 Location: Australia
|
Posted: Wed Jun 14, 2006 4:00 am |
Its the "#ALIAS" thats doing it...
Code: |
#ALIAS TESTADD {#STW {%4} {Extender} {Tracker}} |
Produces an alias with the code:
Code: |
#STW%4 {Extender} {Tracker} |
Which of course does not compile.
If you manually edit that to be:
Code: |
#STW {%4} {Extender} {Tracker} |
the testadd works fine.
Edit:
Code: |
#ALIAS TESTADD {"#STW {%4} {Extender} {Tracker}"} |
Works perfectly for me.
Edit #2:
I think that the "" syntax is probably a work-around at this stage, Zugg will likely fix the core problem when he gets back. |
|
|
|
edb6377 Magician
Joined: 29 Nov 2005 Posts: 482
|
Posted: Wed Jun 14, 2006 4:08 am |
you actually were able to do
testadd ~<COLOR GREEN~>HP:~</COLOR~>@HP and not end up with %4 in your status window value?????
Cause i get that every time
That was the problem i was addressing sorry so much code going through my head i probably pasted a poor alias since i cant export the #ALIAS BLAH CODE i typed it in manually and pasted what i had inside the value.
Basically
testadd ~<COLOR GREEN~>HP:~</COLOR~>@HP
or any form of it doesnt matter ends up putting %4 into the STW due to the requirements for {} around the %4
the value i want is
~<COLOR GREEN~>HP:~</COLOR~>@HP
in my window value |
|
|
|
edb6377 Magician
Joined: 29 Nov 2005 Posts: 482
|
Posted: Wed Jun 14, 2006 4:38 am |
#EXECUTE {#STW {<COLOR GREEN>HP:</COLOR>@HP} {EXTENDER} {TRACKER}}
doesnt work either :/ execute seems broke all together now. |
|
|
|
Rainchild Wizard
Joined: 10 Oct 2000 Posts: 1551 Location: Australia
|
Posted: Wed Jun 14, 2006 5:13 am |
I just did:
Code: |
#ALIAS TESTADD {"#STW {%4} {Extender} {Tracker}"}
testadd name 1 4 {~<COLOR RED~>HP:~</COLOR~>@HP} |
(I used red since green was the colour of the status window anyway)
And got what you would expect:
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Jul 05, 2006 7:51 pm |
Rainchild got this one. It's the #ALIAS compiling that isn't producing a valid script for the #STW command.
The correct way that is supposed to work is:
#ALIAS TESTADD {#STW {%4} {Extender} {Tracker}}
and as Rainchild noticed, this produces the following alias value:
#STW%4 {Extender} {Tracker}
Since this doesn't compile, it doesn't work. Anyway, this has been added to the bug list. |
|
|
|
edb6377 Magician
Joined: 29 Nov 2005 Posts: 482
|
Posted: Wed Jul 05, 2006 10:41 pm |
yeah i get the correct output in some cases but the VALUE of the status window doesnt seem to be right.
Instead of %ansi(green)Hello in the status window value i get the [ code for it instead. I need the value. You actually have the status window coding that i use and the script in full so it should be easy for you to check and i will send feedback with the updated script as well.
I will work on this more after a few things with settings and triggers gets fixed and i can properly play with the settings. |
|
|
|
|
|