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
Tolkienfan
Wanderer


Joined: 07 Apr 2001
Posts: 51
Location: Denmark

PostPosted: Tue Jan 08, 2002 6:52 am   

Swapping Variables
 
Ok heres the deal...i wanna swap some target variables...so that i store target1 and 2 in the oldtarget vars and then exchange target1 and 2 with the secondary targets 1 and 2...then i wanna put the oldtargets 1 and 2 into the new secondarytargets 1 and 2...I have tried doing this by the macro:
oldtarget1=@target1
oldtarget2=@target2
target1=@secondarytarget1
target2=@secondarytarget2
secondarytarget1=@oldtarget1
secondarytarget2=@oldtarget2

But that wont seem to work...when i push it the first time (starting with empty oldtarget vars and with values both in target1 and 2 and secondarytarget 1 and 2...)
Something goes wrong and i end up with no targets...until i press it again then i get an actual swapping and can push it again to swap...but then again i have to push it twice to actually get it to swap....i cant see what im doing wrong here...HelpSmile

Tolkienfan
Reply with quote
Tolkienfan
Wanderer


Joined: 07 Apr 2001
Posts: 51
Location: Denmark

PostPosted: Tue Jan 08, 2002 6:53 am   
 
Correction...it works the first time i push the macro...but when i push it again the target1 and 2 vars just go empty...

Tolkienfan
Reply with quote
TaisharMalkier
Novice


Joined: 28 Sep 2001
Posts: 45
Location: USA

PostPosted: Tue Jan 08, 2002 7:44 am   
 
I believe someone has answered this already.
Please check out this link.
http://www.zuggsoft.com/forum/topic.asp?TOPIC_ID=5096&FORUM_ID=7&CAT_ID=1&Topic_Title=Swapping+variables&Forum_Title=zMUD+General+Discussion

Contain rather than hurt.
Hurt rather than maim.
Maim rather than kill.
Kill rather than be killed.
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