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
tengjunbin
Newbie


Joined: 26 Oct 2004
Posts: 6

PostPosted: Tue Oct 26, 2004 6:13 am   

Help with arrays...
 
I have an array say:
#var testarray {%array()}

which I then proceed to fill up, say:

#noop %arrset(testarray,1,1)
#noop %arrset(testarray,2,2)
#noop %arrset(testarray,3,3)
#noop %arrset(testarray,4,4)

Now I need to duplicate another copy of the array. How can I go about this?

I've tried:

#var copyarray {@testarray}

but all I get is an empty array. Any help is appreciated.

ps: I know I can loop through all elements and copy one by one, but that is very slow. I need something that copies everything in 1 shot.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Oct 27, 2004 9:50 am   
 
Try using a list instead. They are easier to work with and have more functions for interaction.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
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