TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

#math x {$x + }

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
moebius



Joined: 27 Jan 2005
Posts: 96

PostPosted: Fri Apr 14, 2006 1:48 pm    Post subject: #math x {$x + } Reply with quote

The command

Code:
#math x {$x + }


will always set the variable to 0. This is somewhat unexpected. I expected it to treat it the same as adding zero:

Code:
#math x {$x + 0}


Failing that, I would at least expect an error in the expression. The current behavior is rather unexpected and suboptimal.

In a similar manner, other operations will set the variable to 0 if there's no second argument:

Code:
#math x {$x -}
#math x {$x *}
#math x {$x /}
#math x {$x %}
#math x {$x d}


(The came up in a script that uses a variable for the second argument, which might not always be defined.)
_________________
StrangeMUD - strangemud.net:9332
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Wed Apr 19, 2006 1:42 pm    Post subject: Reply with quote

Looks like you found a bug, I'll look into it.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports All times are GMT - 5 Hours
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
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group