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
albo
Apprentice


Joined: 27 Mar 2008
Posts: 106

PostPosted: Sat Oct 01, 2011 6:42 pm   

why would this trigger work for a very long time and just stop?
 
Code:
<trigger priority="10270" id="1027">
  <pattern>Exits:</pattern>
  <value>#ALARM cowrun +3 {#if (%numitems( @cowmobnow)=0) {
    cowmobnow=@cowmobpath
    #exec %pop( cowmobnow)
    } {#exec %pop( cowmobnow)}} cowrunlook
</value>
</trigger>



Once I started using this trigger:
Code:
<trigger priority="10430" id="1043">
  <pattern>Exits:</pattern>
  <value>#ALARM koreruns +4 {#exec %pop(korerunsnow)} korerunslook</value>
</trigger>


It now keeps creating a new @cowmobnow within the folder korerunswalk

I already have @cowmobnow created in the same folder as @cowmobpath


Any idea why in the world that would happen out of the blue, even though it has never happened before?
Reply with quote
albo
Apprentice


Joined: 27 Mar 2008
Posts: 106

PostPosted: Sat Oct 01, 2011 6:45 pm   
 
The major problem is that
Code:
<trigger priority="10270" id="1027">
  <pattern>Exits:</pattern>
  <value>#ALARM cowrun +3 {#if (%numitems( @cowmobnow)=0) {
    cowmobnow=@cowmobpath
    #exec %pop( cowmobnow)
    } {#exec %pop( cowmobnow)}} cowrunwalk
</value>
</trigger>


Keeps creating @cowmobnow in the korerunswalk folder.

Why? And why now, and not the thousands of times it has never done it before? And why is it ignoring the command to do this within the folder cowrunwalk?
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Sat Oct 01, 2011 6:48 pm   
 
You're actually telling it to make the alarm in the cowrunwalk folder, not the variables. If you want to tell CMUD specifically where to put a variable, use the //module/class/.../class/variable syntax (i.e. cowrunwalk/cowmobnow=@cowrunwalk/cowmobpath).
Reply with quote
albo
Apprentice


Joined: 27 Mar 2008
Posts: 106

PostPosted: Sat Oct 01, 2011 6:54 pm   
 
Ok, I'm not sure I follow how'd I incorporate that into those triggers there.

edit:

Well I got it working, but somehow something is still creating a non-used and not needed @cowmobnow within the korerunswalk folder.

Non-used and not needed because it created it once, and I deleted it and everything is working fine. Also it korerunswalk is disabled during the time that I am using the @cowmobnow variable.
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Sat Oct 01, 2011 7:00 pm   
 
Instead of just using variable=blah, use class/variable=blah. As I said above, change the line that says cowmobnow=@cowmobpath to cowrunwalk/cowmobnow=@cowrunwalk/cowmobpath.
Reply with quote
albo
Apprentice


Joined: 27 Mar 2008
Posts: 106

PostPosted: Sat Oct 01, 2011 7:11 pm   
 
Ok I changed up that line within:
Code:
<trigger priority="10270" id="1027">
  <pattern>Exits:</pattern>
  <value>#ALARM cowrun {+3} {#if (%numitems( @cowmobnow)=0) {
    cowrunwalk/cowmobnow=@cowmobpath
    #exec %pop( cowmobnow)
    } {#exec %pop( cowmobnow)}} cowrunwalk
</value>
</trigger>


Because it was the culprit creating @cowmobnow within the korerunswalk folder.

I also put brackets around the alarm time {+3} because that is supposedly the correct syntax..but it doesn't seem to matter if you have them or not.

That is working smoothly. Thanks Daern for helping me clean up that bit of code there.
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