I am trying to compare 2 values and they appear to be equal but are still being evaluated as different.
What am i doing wrong? Any ideas? I added tonumber() just to be sure I wasn’t converting one to a string somewhere.
--Check to see if the current health and the target health differ if tonumber( characterStatus.current[statusColor .. "Health"] ) ~= tonumber( characterStatus.target[statusColor .. "Health"] ) then --Current and Target Heath amounts differ if statusColor == "monster" then print( "\nMonster Amounts Differ ~~~~~~~~~~ =" .. characterStatus.current[statusColor .. "Health"] .. characterStatus.target[statusColor .. "Health"] .. "=" ) end end
The output is “Monster Amounts Differ ~~~~~~~~~~ =99=”