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
Fang Xianfu
GURU


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

PostPosted: Sat Oct 25, 2008 6:11 pm   

[2.36 Lua] Trigger objects don't have a pattern property
 
What it says on a tin - try to refer to it and you'll get an invalid property error. You can get the pattern from the fullname property, but not from pattern.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Zugg
MASTER


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

PostPosted: Mon Oct 27, 2008 4:37 pm   
 
That's correct. Is it listed somewhere that it *should* have a pattern property? The FullName is the correct way to get the pattern. A Trigger is just a "settings object" (zsObject) and all objects have names and value fields. I don't customize the "name" field for each type of setting.
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Mon Oct 27, 2008 5:02 pm   
 
It was here but I've fixed it now.

Old page wrote:
Triggers triggers

Lua can directly create and interact with zScript triggers. Select a method in the list on the left for more information.

In addition to the common properties, a Trigger object has the following properties:
pattern
the same as the fullname property and used to store the full trigger pattern

waitcr
specifies whether to wait for a newline (true/false)
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Zugg
MASTER


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

PostPosted: Tue Oct 28, 2008 3:56 pm   
 
Cool, thanks. I copied that from the list of properties in Delphi and the Pattern property is actually an object that contains a cached set of compiled code for creating the pattern string. It's possible that when I wrote the documentation I had forgotten about this internal property and then when I went to implement the Lua interface, I ran into the name conflict with the existing property and then never removed it from the documentation.

Thanks for correcting it.

Edited: Oh, I figured out what happened. Instead of "Pattern", the property is called "Trigger". Could you edit the documentation for me and change it from Pattern to Trigger? Thanks!
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Tue Oct 28, 2008 5:07 pm   
 
Yays.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
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