|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: 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) |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: 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. |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: 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. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: 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 ;)
|
|
|
|
|
|