Probably another n00b question, but here goes.
I want to check a field to see if it has a nil value (ie: is blank)
If it’s blank i want to set its associated variable to 1. Otherwise, set the variable to the number of whatever is in the box.
if (FieldA:getText()==nil) then
NumA = 1
else
NumA = (tonumber(FieldA:getText()))
end
However, if I leave the field blank, when I print NumA in terminal, it is nil, not 1.
If I put a value in Field A, it is displayed properly.
How do I get the functionality I’m looking for?