|
rwfrk Wanderer
Joined: 26 Feb 2002 Posts: 81 Location: USA
|
Posted: Sun Aug 11, 2002 3:06 am
Problems with triggerVer616 |
Today I tried doing what I expected would be a simply prompt/value trigger...but it doesnt seem to be..
When I end up in a room with no exits..it starts spouting out the value from my previous room instead of setting it null or white space ;)..
..Trigger:+ <(*)/(*)hp (*)/(*)m (*)/(*)mv> <Exits:(*)> <Qst: (*) TNL: (*)> <ROOM: (*) >$
..Results:
#var hp %1
#var maxhp %2
#var mana %3
#var maxmana %4
#var move %5
#var maxmove %6
#var exits %7
#var quest %8
#var tnl %9
#var room %10
..Prompt:
<6132/6132hp 4499/4499m 1246/1246mv> <Exits: U> <Qst: 0 TNL: 843> <ROOM: Chamber of Assistance >
Error message Example:
<6132/6132hp 4197/4499m 616/1246mv> <Exits: > <Qst: 0 TNL: 843> <ROOM: Clan Member's Sleeping Quarters >
Variable: exits NW
Variable: exits NW
Variable: exits NW
Variable: exits NW
<etc>..almost continuous as I have the prompt sent to me every tick..barely time to turn it off. |
|
|
|
rwfrk Wanderer
Joined: 26 Feb 2002 Posts: 81 Location: USA
|
Posted: Sun Aug 11, 2002 3:14 am |
Oh..and thanks in advance
running w95 |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sun Aug 11, 2002 3:45 am |
First lets tighten your trigger to a more precise match, and make sure it matches the special characters:
#TR {^~<(%d)/(%d)hp (%d)/(%d)m (%d)/(%d)mv~> ~<Exits:(*)~> ~<Qst: (%d) TNL: (%d)~> ~<ROOM: (*) ~>$}
Next lets fix your code:
#var hp %1
#var maxhp %2
#var mana %3
#var maxmana %4
#var move %5
#var maxmove %6
#var exits "%7"
#var quest %8
#var tnl %9
#var room "%10"
So altogether:
#TR {^~<(%d)/(%d)hp (%d)/(%d)m (%d)/(%d)mv~> ~<Exits:(*)~> ~<Qst: (%d) TNL: (%d)~> ~<ROOM: (*) ~>$} {#var hp %1;#var maxhp %2;#var mana %3;#var maxmana %4;#var move %5;#var maxmove %6;#var exits "%7";#var quest %8;#var tnl %9;#var room "%10"} "" {prompt|nocr}
The problem was occurring because you failed to put quotes around all strings. I keep saying this, but no one seems to listen. It only cost a few seconds typing to toss the quotes in there, but can take hours trying to track down a bug when you don't. Either put the quotes or the braces, but don't leave those strings exposed to cause problems. |
|
|
|
|
|