|
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: 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. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: 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.
|
|
|
|
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Sat Sep 25, 2010 1:35 am |
Fixed in 3.29b.
|
|
|
|
|
|