+ 2

[Solved][CharGen]. The math of the racial modifiers is not correct and i dont know why

It is supposed to generate stats, then modify thoose stats based on race. But when it comes up its sometimes adding 4 instead of 2 and its modifying numbers that aren't supposed to be modified. for link to code: search CharGen on CodePlayground Solution: i did not put my breaks in the racial modifier switch.

11th Jun 2017, 2:11 PM
oddeofreq
oddeofreq - avatar
2 Antworten
+ 12
It can be hard to tell without seeing the actual code (perhaps a link?), but since you tagged this with switch, I'll ask something I regularly ask myself: did you place your break statements appropriately? If not, you can get some odd behavior with multiple cases executing....
13th Jun 2017, 4:10 AM
Jim
Jim - avatar
+ 1
Solved. thanks Jim
20th Jun 2017, 6:20 PM
oddeofreq
oddeofreq - avatar