A helpful thing when you have a lot of tests is to use indentations to make everything clearer.
if
else
elseif
are not indented, but the things within them are indented some amount (we use 2 spaces for each indent for our own code in Hero Lab).
So:
Code:
if (hero.tagis[Helper.Quadruped] <> 0) then
if (herofield[tSize].value >= 4) then
newmaxwt *= 24
elseif (herofield[tSize].value >= 3) then
newmaxwt *= 12
When there's lots of if statements, that's useful to me in tracking where one ends and the next begins.