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
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Fri Nov 02, 2007 8:34 am   

compatibility report - zmud import
 
Trig commands:

#CASE @t%t1arm {t%t1arm=2;#SAYPROMPT %proper( %t1) arm broken.} {#SAYPROMPT %proper( %t1) arm already mangled.} {#SAYPROMPT %proper( %t1) arm already destroyed.}


OR

Code:
<trigger type="Within Lines" param="1">
  <pattern>{You grunt as your paw forcefully pummels|with your long, savage claws.}</pattern>
  <value>#CASE @t%t1arm {t%t1arm=2;#SAYPROMPT %proper( %t1) arm broken.} {#SAYPROMPT %proper( %t1) arm already mangled.} {#SAYPROMPT %proper( %t1) arm already destroyed.}</value>
</trigger>


Error message:
Does not compile : unmatched braces at row 0 col 64

I can't figure this one out, does anyone have any ideas? The braces are all paired, and the syntax checker highlights each pair correctly when I click on them.
_________________
Athlon 64 3200+
Win XP Pro x64
Reply with quote
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Fri Nov 02, 2007 9:24 am   
 
I believe I have fixed it. The error message was misleading. The problem is that:

t%1%2=3

will not set the value of a variable such as tleftleg to 3.. it just wont compile.

#VAR t%1%2 3

compiles fine. I cannot find the help file that explains how to do this with the var=value syntax; does anyone know how? (Its no biggy.. I can do it this way, I just prefer to use the = syntax, that is all.)
_________________
Athlon 64 3200+
Win XP Pro x64
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Fri Nov 02, 2007 10:21 am   
 
You could try:
%concat("t",%1,%2)=3
but I haven't tried it. I changed a few of my scripts to use #VAR.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Fri Nov 02, 2007 10:36 am   
 
Yes, this sort of implicit concatenation sometimes doesn't work with the new parser. Strictly speaking, your #var command there shouldn't be working either without an explicit concat using %concat("omg","lol") or ("omg" + "lol"), but it does because Zugg's nice :)

%concat("t",%1,%2)=3 doesn't work either, as far as I know. If you want to use dynamically-named variables, you should use #var.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Fri Nov 02, 2007 11:15 am   
 
Ah well. I'll live, I suppose :D
_________________
Athlon 64 3200+
Win XP Pro x64
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