1+1=11‽ character Sheet

Be sure to read and follow the guidelines for our forums.

Aug 13, 2024 4:50 pm
Currently working on a Mutants and Masterminds character sheet (the prebuilt one needs some love), but I am having an issue with the autocalculator. it seems to be listing numbers instead of adding them in certain situations (for example 1+1=11), but also sometimes adding. This is what I have found so far.
-It is mostly when I put one number in the Ability field and one in either the Skill Misc Mod, Initiative Power Mod or Advantages
-If I put a number in a third field in the equation it seems to always work correctly
- Abilities field + Skills Skills field seems to work
[ +- ] Character Sheet
Aug 13, 2024 6:24 pm
it happens when you are adding blank fields
Quote:
1+ [ ] + 2 = 12
Either put the bank fields at the end, or set the blank values to 0
Quote:
1+ 2 + [ ] = 3
1+ 0 + 2 = 3
Aug 13, 2024 6:29 pm
From tinkering around, it seems to be caused by empty fields being parts of a sum with more than two variables. Even something simple like this causes the same problem:

[_t1=10]
[_t2=]
[_t3=30]
[_x$=t1+t2+t3]

(x displays as 1030 here)

I think this is a bug and you can't really fix it. But you can do a band-aid solution of just replacing empty field with 0s - it makes calculations work correctly.

Edit: oop, ninja'd. :P
Last edited August 13, 2024 6:30 pm
Aug 13, 2024 6:44 pm
Ok, thanks you both. I can fix this by having a default of 0 in each field.
Aug 13, 2024 6:45 pm
Lol. I love javascript. It's like a mad drunk mate who's always trying to be helpful but is unfortunately both mad and drunk.

https://i.imgur.com/l7kRgFY.png

You do not have permission to post in this thread.