subtract function
Posted: Tue Mar 10, 2015 12:14 pm
Hi!
I'm trying to make a simple subtract operation on a text field but i get an "cant' find object" error and i can't understand why...
Here is my code:
No problem if the number is less or equal to 0. Instead if the number is positive i get the error. What's wrong with my code?
If i use thee same code but with the ADD function instead of subtract, all work good.

I'm trying to make a simple subtract operation on a text field but i get an "cant' find object" error and i can't understand why...
Here is my code:
Code: Select all
on mouseUp
put the text of field "numero" into tNumero
if tNumero > 0 then
subtract 1 to tNumero
else
put 0 into tNumero
end if
put tNumero into field "numero"
end mouseUp
If i use thee same code but with the ADD function instead of subtract, all work good.
