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
Tech
GURU


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

PostPosted: Sat Oct 21, 2006 7:55 pm   

[1.11] Problems with named parameters
 
I've got a weird alias bug here.

Code:
#VAR StepResult 50 0 {Money}
#LOCAL $Temp1 $ResultStr

#echo $Divisor $Dividend
$Temp1=$Divisor/$Dividend
#VAR Remainder %mod( $Divisor, $Dividend)
#show $Temp1


Outputs the correct value as expected but this
Code:
#VAR StepResult 50 0 {Money}
#LOCAL $Temp1 $ResultStr

$Temp1=$Divisor/$Dividend
#VAR Remainder %mod( $Divisor, $Dividend)
#show $Temp1

Outputs 0.

It was called using conv_step 300 47 Mark

[Edit] My work around to avoid issuing #GAG is to replace the #ECHO with #CALL.
_________________
Asati di tempari!
Reply with quote
Zugg
MASTER


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

PostPosted: Mon Oct 23, 2006 7:29 pm   
 
I assume $Divisor and $Dividend are the named alias arguments?

I verified the problem. It was interesting that if I remove the line

#LOCAL $Temp1 $ResultStr

then it works. Since $Temp1 is defined by the assignment on the next line, the #LOCAL line wasn't needed. But it looks like #LOCAL is somehow messing up the named arguments, so I'll look into this. Thanks for the report.
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