 |
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: 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... ;) |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Oct 20, 2006 4:39 pm |
Thanks for posting this example. I'll work on that to see what the problem is.
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: 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.
|
|
|
 |
|
|