Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
TesterOfLimitz
Novice


Joined: 02 Jun 2007
Posts: 37

PostPosted: 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
Reply with quote
Fang Xianfu
GURU


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

PostPosted: 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.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: 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...
Reply with quote
Zugg
MASTER


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

PostPosted: 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.
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Sun Mar 01, 2009 5:46 am   
 
Laughing Sorry Zugg.
Reply with quote
Eluned
Newbie


Joined: 29 Jan 2007
Posts: 8

PostPosted: 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 :)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion 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