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
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Fri Aug 01, 2008 3:45 am   

whats wrong with this trigger? 0o
 
Seems to me like it would work fine, but for some reason, its sending practically the whole action, instead of processing the actions inside of it. Make sense?

Code:
#var bkill 0
#reg {^You open the ((?:\w++)(?:\s\w+)?) leading (north|south|east|west|up|down)\.$} {#if (@bkill = 0) {%2;#switch (%2 = "north") {close %concat(south,".",%1)} (%2 = "south") {close %concat(north,".",%1)} (%2 = "west") {close %concat(east,".",%1)} (%2 = "east") {close %concat(west,".",%1)} (%2 = "up") {close %concat(down,".",%1)} (%2 = "down") {close %concat(up,".",%1)}}}


But when I get for example from the mud: You open the gate leading north. Then this gets sent to the mud:
north
#switch (north = north) {close south.gate} (north = south) {close north.gate} (north = west) {close east.gate} (north = east) {close west.gate} (north = up) {close down.gate} (north = down) {close up.gate}
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Fri Aug 01, 2008 3:54 am   
 
Because you cannot start a line with a function, as you have done with just putting %2;#switch and whatnot.

In order to fix it, please change it to:

#SEND {%2}
or
#EXEC {%2}

Also, take a look at THIS topic.

Charneus
Reply with quote
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Fri Aug 01, 2008 12:29 pm   
 
Oh yeah!! Stupid stupid stupid, I know better too. LoL, thanks Charneus! =]
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