found the error
if ($readini($2 $+ .ini,$2,PowerLevel) <= 0) {
Should have been
if ($readini($2 $+ .ini,$2,hp) < 1) {