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


Joined: 01 Nov 2006
Posts: 27

PostPosted: Sat Nov 22, 2008 3:34 pm   

[2.37] Unmatched nested brackets error
 
Code:
#temp "gagbag" {It is a magic bag created by *.} {
  #gag
  #gagon
}
#temp "checkbag" {bag of holding is &lastpercent} {
  #if (@lastpercent="empty.") {
    #var lastpercent 0
  } {
    #var ret %regex( @lastpercent, "about (\d+)% full", lastpercent)
    #if (@lastpercent>80) {
      give bag @numbags to %char
      #var lastpercent 0
      #math bagleft (@bagleft-1)
    }
  }
  #gagoff
}
l bag


CMUD is telling me the open bracket in this line '#if (@lastpercent="empty.") {' is unmatched. Worked in older versions of CMUD.

Any ideas?
Reply with quote
Zugg
MASTER


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

PostPosted: Sat Nov 22, 2008 4:51 pm   
 
The problem is using an ID name for the #TEMP command. Temp triggers don't usually have ID values. Are you sure you mean to have #TEMP and not just a normal #TRIGGER command?
Reply with quote
abascom
Beginner


Joined: 01 Nov 2006
Posts: 27

PostPosted: Sat Nov 22, 2008 5:29 pm   
 
I believe the reason I added the IDs is because I was sometimes having a problem with multiple temp triggers being created and sticking around. Then I would have to go delete them all manually in order for this to work again.

I'm using temp because I want them to fire once and then go away so I can see the contents of the bag when I look at it normally (without executing this alias).

Removing the IDs does work. I'll let you know if I see the problem with tons of temp triggers being saved again... or do you know that this was fixed?

Thanks.
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