Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Sun Mar 30, 2008 5:34 pm   

Script problems with %line2 and %line3
 
Oddly, I'm having trouble with this script that I SHOULDN'T be.
:)

I'm having trouble with %line2 NOT reading the previous line, its returning the SAME line. So is %line3. Anyone have any ideas?

edit: Forgot to say using 7.21 as I should be ;)
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Mon Apr 21, 2008 4:13 pm   
 
*Bump*

Still having issues here, any ideas from anyone?
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Mon Apr 21, 2008 4:24 pm   
 
Post some code, maybe it's something tiny you overlooked.
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Mon Apr 28, 2008 9:50 pm   
 
Umm, just doing something like:

Code:
#TR {You are dead.}
{
#var prevA %line2
#var prevB %line3
#ECHO @prevA
#ECHO @prevB
}


And it simply outputs
You are dead.
You are dead.

As I stated, its capturing the actual line, not the previous line or the previous-1 line. It is very irritating. So obviously I must be missing something blandly simple... or it isn't working right.

Oh, and I AM using zMUD on Vista, though that *shouldn't* be related, since its running with Admin privs and UAC disabled.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Mon Apr 28, 2008 10:05 pm   
 
Sadly this is something that just happens.
When the trigger displays something to the screen it messes with the internal buffers and as such increments the %line number.
I would suggest trying something like #priority, #alarm, or putting the echos into an alias and calling the alias.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Mon Apr 28, 2008 10:22 pm   
 
The values in @prevA and @prevB are set before he outputs anything to the screen though?
When I tried this trigger in a blank session and echoed
Code:
#echo Line2
#echo Line1
#echo You are dead.

My resulting screen looks like this:
Code:
Line2
Line1
You are dead.
Line1
Line2


Which is correct.
If you run your example in an empty session does it still produce the errors you mentioned?
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Mon Apr 28, 2008 10:55 pm   
 
Yes. Which is why I'm totally lose. Its not that it spits any error, just grabs the SAME line. Its so confusing. I get this as my output:

Code:
Line2
Line1
You are dead.
You are dead.
You are dead.


So, now I'm VERY confused ;) This SHOULD work.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net