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
Yodous
Apprentice


Joined: 23 Jun 2004
Posts: 105
Location: Poland

PostPosted: Sun Jun 20, 2010 1:50 pm   

[3.20] error with %list()
 
As GeneralStonewall wrote in some other topic, I create another thread.

After an update to the 3.20 beta, "$tmpValue = %list()" or simply "#SA %list()" throw an application exception (access violation at read...).

Edit: The code below already works, sorry for trouble

I would like to achieve something like:
Code:

$tmpList = "onet|two|three"
$tmpValue = %null
#FO $tmpList {
     $tmpValue = %additem(%i, $tmpValue)
     //do some checks
}

So in fact I would like to have:
Code:
$tmpName = %null //initialize the variable
$tmpName = %additem("one", $tmpName) //I want to have a value "one"
$tmpName = %additem("two", $tmpName) //Now I want to have a value "one|two"


And in 3.20 this code produce me "|one" and "|one|two". So how I can get this problem solve without using some substrings?

Best regards
Yodous


Last edited by Yodous on Sun Jun 20, 2010 6:03 pm; edited 1 time in total
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Sun Jun 20, 2010 4:12 pm   
 
I was unable to recreate this. In a blank session I ran the following code.
Code:
$tmpList = "onet|two|three"
$tmpValue = %null
#FO $tmpList {
     $tmpValue = %additem(%i, $tmpValue)
     //do some checks
     #print $tmpValue
}
#print $tmpValue


And I got the following out, which is what is expected.

Code:
onet
onet|two
onet|two|three
onet|two|three


So unless I'm missing something, I'm not sure what the error is.
_________________
Asati di tempari!
Reply with quote
Yodous
Apprentice


Joined: 23 Jun 2004
Posts: 105
Location: Poland

PostPosted: Sun Jun 20, 2010 5:53 pm   
 
Ok. You have got right.
When it was 3.19f I use something like:

Code:

$tmpList = "onet|two|three"
$tmpValue = %null
#FO $tmpList {
     $tmpValue = %additem(%i, %list($tmpValue)) //here added %list()
     //do some checks
     #print $tmpValue
}
#print $tmpValue

In order to make it works.
After 3.20 the %list() is unnessesary and everything works fine. Sorry for trouble.

But the %list() still throws exception
Reply with quote
Zugg
MASTER


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

PostPosted: Mon Jun 21, 2010 4:33 pm   
 
I reproduced the "#SAY %list()" error and have added it to the bug list.
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