PDA

View Full Version : Crash bug using multistate



Dachannien
February 17th, 2006, 02:16
I'm working on an expanded d20 CRS, and decided to use a multistate clicker for selecting one's size (the values for which will carry into AC and attack bonuses, of course).

Anyway, I thought I had everything in place properly, and FG loads up the ruleset fine, but when I click on the region where the multistate control is, FG crashes (via exception, not by just exiting). Note that FG doesn't show any of the icon images listed in the multistate control to start with.

Here's my code (I've commented out all the extra stuff about linking the value to other controls in the code, and it still crashes):

In charsheet.xml:


<multistate name="size">
<bounds rect="168,51,22,13" />
<state value="0" icon="size_none" />
<state value="1" icon="size_m" />
<state value="2" icon="size_s" />
<state value="3" icon="size_l" />
</multistate>

Elsewhere, properly included:


<icon name="size_none" file="rulesets/btd_custom/icons/size_none.png" />
<icon name="size_m" file="rulesets/btd_custom/icons/size_m.png" />
<icon name="size_s" file="rulesets/btd_custom/icons/size_s.png" />
<icon name="size_l" file="rulesets/btd_custom/icons/size_l.png" />

The four pngs are in the specified location and are of the same size as the bounds shown in the multistate control.

Am I missing anything? What am I screwing up here? Is there possibly something wrong with the png format I'm using (e.g., the program I'm using - Paint Shop Pro 7 - to save the pngs out)?

Dachannien
February 17th, 2006, 02:21
Doh! Never mind. I couldn't find an option to delete my post, but I found out that the name "size" is apparently being used somewhere else, and FG can't handle it. It may have arisen because a previous version of my custom ruleset used "size" as the name of a stringcontrol rather than a multistate control, and I was using a test character that I had saved using the custom ruleset before I'd changed the control type. So, FG ended up trying to take the string-shaped peg taken from the character and jam it into a multistate-shaped hole ;)

Anyway, hopefully that's on the "to do" list for 1.06: graceful exits when ruleset problems are encountered :)