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
zogalogran
Beginner


Joined: 23 Jun 2006
Posts: 20

PostPosted: Sat Mar 03, 2012 6:58 pm   

trigger text capture and class membership
 
I am currently capturing text as follows:

#TR line1 {&{name} can be referred to as '&{tags}'} {} idtemp

No problems there, I would just like @name and @tags to be members of the idtemp class. Is there a way to do this?

Thanks!
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Mar 03, 2012 7:20 pm   
 
Not via the &varname reference (by the way, you don't need the {} around variable name). You can do what you want very easily via a=b variable syntax, though:

//module or window name/class/path/to/idtemp/varname = value
_________________
EDIT: I didn't like my old signature
Reply with quote
zogalogran
Beginner


Joined: 23 Jun 2006
Posts: 20

PostPosted: Sat Mar 03, 2012 7:51 pm   
 
Gotcha - thank you.
Reply with quote
zogalogran
Beginner


Joined: 23 Jun 2006
Posts: 20

PostPosted: Sun Mar 04, 2012 4:38 pm   
 
An addendum to this post - I used your recommended syntax to create the variables in the desired class, and they are subsequently stored in that class. Now when I use #DELC to remove the class (which contains triggers, and the variables created using the above method), the triggers are deleted properly but all of the variables get dumped up to the parent level. Is there a good way to remove those variables without #UNVARing every last one of them?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Mar 04, 2012 6:56 pm   
 
If you delete a class and stuff in that class is for sure not getting removed along with that class, then either what you think is not getting removed properly wasn't in that class to begin with (ie, script tried saving data after the variables were deleted) or there's no way around this other than to write scripts that disable/enable rather than create/delete (creation/deletion is much slower than enable/disable, fyi).
_________________
EDIT: I didn't like my old signature
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