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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Sun Jan 13, 2008 12:43 pm   

[2.18] %i from #LOOP lost inside new #THREAD
 
#loop 1 {#thread %i {#say %i}}

Doesn't work, %i isn't being passed into the new thread
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Jan 14, 2008 6:04 pm   
 
Yep, that's true. The %i variable is a stack reference and is only valid within the same thread. You'll find the same problem with local variables. Since each thread has it's own independent runtime stack, there is no way to pass data like this. If you need to pass data to a thread, then you need to use a normal variable.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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