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


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Fri Oct 20, 2006 4:09 pm   

[1.10] Dodgy trigger pattern/action creation
 
A few things with trigger creation

#TRIGGER {Test (%d).} {#say (100 + %1);#say (100 + %float(%1))}

Creates a trigger based on pattern
Test (%d).

But the actions created by it are
#say100 + %1;#say100 + %float(%1)

When this is corrected to
#say (100 + %1)
#say (100 + %float(%1))

and you test the trigger with 'Test 123.'
Then you get
100123
223

Which is incorrect for the first response. %1 should be an integer, not least because I identified it as one in the pattern match, so I shouldn't have to cast it to be able to do a calculation

So
1) Problem removing spaces from an action
2) Problem removing the parenthesis from an action
3) Problem evaluating variable types involved in pattern matches
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Zugg
MASTER


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

PostPosted: Fri Oct 20, 2006 4:39 pm   
 
Thanks for posting this example. I'll work on that to see what the problem is.
Reply with quote
Zugg
MASTER


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

PostPosted: Fri Oct 20, 2006 7:06 pm   
 
I've got this fixed for v1.11. Thanks for the detailed example...it really helped me fix this quickly and easily.
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