I tested my code against real objects, so there can't be a problem if you're truly getting the score variables as strings.
$convert.parseNumber() coerces an empty string "" to null. Then a > 0 comparison will error out because you can't compare null to a number (you won't see the error, but the condition will fail silently).
Can you just dump
and post the results? There's something missing here.
Got it. The fields that are being evaluated are integer fields not score fields. I changed the "$oppScoreField" for "$oppIntegerField".
Thanks for all your help.