|
abascom Beginner
Joined: 01 Nov 2006 Posts: 27
|
Posted: 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? |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: 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?
|
|
|
|
abascom Beginner
Joined: 01 Nov 2006 Posts: 27
|
Posted: 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. |
|
|
|
|
|