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
The Raven
Magician


Joined: 13 Oct 2000
Posts: 463

PostPosted: Tue Nov 14, 2006 4:54 am   

[1.15] User defined functions don't work in #IF (expression)
 
Reproduce:

Create the function variable: #VAR Triple {%1*3}
Test it to make sure it works: #ECHO @Triple(4)
Bug occurs when you use it like this: #IF (@Triple(3)=9) {#ECHO True}

Using user-functions in the test part of an #IF statement causes a syntax error.
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Tue Nov 14, 2006 4:59 am   
 
Sorry if I was unclear in my post. This is the same bug I posted about. The way to make it work temporarily is to do this

#if (%eval(@tripple(3)=9)) {} {}

There are other issues too, like you may find that you need to use %int for example.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Tue Nov 14, 2006 5:25 am   
 
Yeah, I'm getting this a lot in some of my scripts. I'm not going to totally overhaul them like this for something that's going to be fixed, though, and end up with a) a load of time wasted working round the problem and b) have a load of extra functions in my scripts to slow them down.

Original posts for this are here and here.
Reply with quote
The Raven
Magician


Joined: 13 Oct 2000
Posts: 463

PostPosted: Tue Nov 14, 2006 10:57 am   
 
You were perfectly clear Arminas... I just missed your post. Oops.
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