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
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Fri Sep 24, 2010 12:51 am   

[3.29a] Reformatting issue with switch
 
Using reformatting on this:
Code:
#switch (%1 == "undamaged") {$damage_num = 0}
        (%1 == "damaged")   {$damage_num = 8}
        (%1 == "mangled")   {$damage_num = 12}


Leads to this:
Code:
#switch (%1 == "undamaged") {$damage_num = 0}
        (%1 == "damaged")   {
  $damage_num = 8
  }
        (%1 == "mangled")   {
  $damage_num = 12
  }


This is odd, since that seems like a really straight-forward switch case. I was testing the new reformatting on various scripts and it didn't have an issue on many that were quite a bit more complicated, making this all the more puzzling.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Sep 24, 2010 2:04 am   
 
Can't promise anything but I'll look into it. The problem is that #switch violates the normal rules of the parser because of the additional () clauses. So that makes #switch a real pain in the * to format correctly without adding all sorts of special kludges to the code.
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Sat Sep 25, 2010 1:35 am   
 
Fixed in 3.29b.
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