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


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

PostPosted: Mon Mar 10, 2008 5:13 am   

[2.18] Looplines problem?
 
I was talking to someone last night, trying to adapt a zMUD script to CMUD. Here's the script he had:

Code:
#CLASS {MapCapture}
#ALIAS map {#T+ "mapcap_trig1";~map}
#TRIGGER "mapcap_trig1" {^--*} {#GAG;#CAP "map"} "" {disable}
#COND {(*)} {#GAG;#cap "map"} {looplines|param=23}
#COND {^--*} {#GAG;#CAP "map";#T- "mapcap_trig1"}
#CLASS 0


and an example of the text it's supposed to match:

Code:
--- Area 339: Mount Gheladan ----------------
                      |                     
             [ ]-[ ]-[ ]-[ ]-[ ]             
              |   |   |       |             
             [ ] [ ] [ ]     [ ]-[ ]-[ ]     
                      |       |             
                     [ ]     [ ]             
                    /                       
                 [ ]                         
                  |                         
                 [ ]                         
                    \                       
                     [+]                     
                      |                     
                     [ ]                     
                      |                     
             [x] [>]-[ ]-[ ]-[ ]             
                              |             
                             [ ]-[ ]         
                              |     \       
                             [ ]     [ ]     
                            /         |     
                         [ ]         [ ]     
                          |           |     
--- A shimmering chamber ---------- 2:3:4 ---


So, to show this bug, enter the script above and create a new window, then enter the following at the command line:

Code:
map
#say "--- Area 339: Mount Gheladan ----------------"
#say "                      |                      "
#say "             [ ]-[ ]-[ ]-[ ]-[ ]             "
#say "              |   |   |       |              "
#say "             [ ] [ ] [ ]     [ ]-[ ]-[ ]     "
#say "                      |       |              "
#say "                     [ ]     [ ]             "
#say "                    /                        "
#say "                 [ ]                         "
#say "                  |                          "
#say "                 [ ]                         "
#say "                    \                        "
#say "                     [+]                     "
#say "                      |                      "
#say "                     [ ]                     "
#say "                      |                      "
#say "             [x] [>]-[ ]-[ ]-[ ]             "
#say "                              |              "
#say "                             [ ]-[ ]         "
#say "                              |     \        "
#say "                             [ ]     [ ]     "
#say "                            /         |      "
#say "                         [ ]         [ ]     "
#say "                          |           |      "
#say "--- A shimmering chamber ---------- 2:3:4 ---"


and you'll notice how some of the lines aren't captured, which I'm guessing means the trigger isn't firing. But why not? I have no idea - we fixed the problem in the end by removing the looplines state and using a separate trigger instead. Anyone got an idea?
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Mon Mar 10, 2008 11:40 am   
 
I always use a blank pattern with looplines. If you have a pattern then you want to use looppat. The way it which having a pattern with looplines causes it to fail looks like a bug.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
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