Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4717
Location: Pensacola, FL, USA

PostPosted: Sun Apr 19, 2009 8:27 pm   

[3.06] Misclaimed, mismatched braces
 
Code:
<alias name="updateGame" id="121">
  <value>$this=%params
$that=@{this.$this}
#IF ($that>0) {%expandlist($this)=$that}</value>
</alias>


For some reason it says there is a mismatched brace in my #IF statement... can anyone tell me why?
_________________
Discord: Shalimarwildcat
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4717
Location: Pensacola, FL, USA

PostPosted: Sun Apr 19, 2009 8:39 pm   
 
i changed the #IF to this to get things working... but i still dont see what was wrong with my original code...

#IF ($that>0) {#VAR %expandlist($this) {$that}}
_________________
Discord: Shalimarwildcat
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sun Apr 19, 2009 9:40 pm   
 
Because the = assignment operator requires the variable name to be a simple name - it can't evaluate functions. That's what the #var command is for, and using it as you are in your second post is the correct way to do this.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Arde
Enchanter


Joined: 09 Sep 2007
Posts: 605

PostPosted: Sun Apr 19, 2009 9:43 pm   
 
Hmm... Start line with a command? Rolling Eyes

P.S. Can you tell me what you expect your #VAR %expandlist($this) {$that} will do if $this will have more than 1 element? Just interesting...
_________________
My personal bug|wish list:
-Wrong Priority when copy-paste setting
-1 prompt trigger for Mapper, Session and General Options, not 3 different!
-#SECTION can terminate threads
-Buttons can't start threads
Reply with quote
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Mon Apr 20, 2009 12:53 am   
 
Yeah, I'm curious about what that could do as well.
_________________
Athlon 64 3200+
Win XP Pro x64
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4717
Location: Pensacola, FL, USA

PostPosted: Mon Apr 20, 2009 12:06 pm   
 
Oh, I was using massive indirection in my solving a sudoku puzzle package.
It was a great mental excersize!

the way im using it, $this is always a single alphanumeric... but i suspect that it would put my value into the default value field
_________________
Discord: Shalimarwildcat
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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