|
TesterOfLimitz Novice
Joined: 02 Jun 2007 Posts: 37
|
Posted: Fri Feb 27, 2009 9:55 am
[2.37] Problem with zs.param in a Regex trigger |
Sorry if this has been brought up before, I looked around for a bit and didn't see anything buuuut:
I'm working on a prompt trigger for Lusternia, and I was wanting to script it in Lua but I can't get the parameters to pass through.....
(For comparison, I changed the trigger type to zScript and used #lua instead of a Lua style trigger, it returns the same values for the params either way.)
Code: |
<trigger priority="110" regex="true" newline="false" prompt="true" id="11">
<pattern>^\d+h, \d+m, \d+e, \d+p, \d+en, \d+w(?:, (\d+)mo|) (\w+)-$</pattern>
<value>#say
#say "#say %1 value:" %1
#say "#say %2 value:" %2
#lua {
print("Print(zs.param(2) value: " ..zs.param(2))
}
#lua {
print('Print(zs.param("2") value: ' ..zs.param("2"))
}</value>
</trigger> |
Displays:
Quote: |
1102h, 924m, 651e, 10p, 3780en, 3390w elrx-
#say %1 value:
#say %2 value: elrx
Print(zs.param(2) value: 0
Print(zs.param("2") value: 0
|
Quote: |
1102h, 924m, 651e, 10p, 3758en, 3390w, 2mo ex-
#say %1 value: 2
#say %2 value: elrx
Print(zs.param(2) value: 0
Print(zs.param("2") value: 0 |
Halllp |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Feb 27, 2009 10:42 am |
There're some Lua bugs in 2.37, one of which affects zs.params(), if I recall. It's possible that this a symptom of that. They should hopefully be fixed in 3.04.
|
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Sat Feb 28, 2009 4:33 pm |
Not to complain, but it is a pretty big problem since you need to capture params or most triggers are worthless. I think it should have been fixed with a small update or something since it was a bug that existed before the new upgrade to the mapper and so on and 3.04 from what I understand will just be another Beta version. Therefore, anyone who wishes to use Lua is just out of luck apparently...
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Sat Feb 28, 2009 9:04 pm |
OldGuy...we get it...you want the Lua fixes...you don't need to post into every darn thread about it. You need to keep in mind that only a very small percentage of CMUD users even use the Lua interface at all. That is why this wasn't fixed in any sort of "quick fix" release. I know it bugs you and I know you want to use Lua, but you just have to be patient. And yes, you are complaining about it.
|
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Sun Mar 01, 2009 5:46 am |
Sorry Zugg.
|
|
|
|
Eluned Newbie
Joined: 29 Jan 2007 Posts: 8
|
Posted: Tue Mar 03, 2009 12:41 am |
Just wanted to mention that actually several individuals I've talked to in Achaea only find CMUD attractive versus some open source clients because it implements Lua.
Just food for thought :) |
|
|
|
|
|