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
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Thu Apr 26, 2007 2:58 am   

[1.30] Local Variables not working correctly (Mildly Urgent)
 
This code worked in 1.29


Using a blank package

Code:
#ALIAS test($this) {
#SWITCH 1
  (!$this) {#SAY No This var -$this-}
  (1) {#SAY This var -$this-}
}


type test hit enter
if you don't pass anything it seems to work correctly output is No This var --

test blah
but if you type it with a parameter it also outputes No This var -blah- when it should output This var -blah-
as far as I can tell it only happens when using #switch 1 (which should trigger on the first statement equaling 1)

Also a second problem I noticed in 1.29 you could do

$string="This is a test"
$prefix="Say "
$string=$prefix+$string
#ECHO $string

This returns blank in 1.30 to work around it just explicitly concat $string=%concat($prefix,$string)
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Zugg
MASTER


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

PostPosted: Thu Apr 26, 2007 3:11 am   
 
Sigh. I'm grateful that you guys bother to download and test these releases when you know that there are going to be at least a couple quick fixes.

In any case, yes, this was very serious...seems to be a side effect of the fix for the #MATH command. I quickly found the problem and have uploaded another quick fix for v1.30. So, download it again and give it another try. And thanks for reporting this.

Edited: BTW, it was the same bug causing both problems. And it wasn't just with local variables.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Thu Apr 26, 2007 3:17 am   
 
Tested and working correctly. Thanks Zugg!

I almost didn't catch this, I was fiddling around with one of my trigger scripts trying to clean it up and remove some spam when I noticed it.
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Zugg
MASTER


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

PostPosted: Thu Apr 26, 2007 3:25 am   
 
Yeah, the bug that I had fixed related to #MATH was that CMUD wasn't handling auto-typing correctly...some strings that contained numbers would not be handled properly as numbers. But I screwed up the fix and ended up causing strings to always be handled as numbers! Like I said...pretty serious ;)
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