how to compare 2 values ​​of variables, help-me please ...

I’m not able to compare two values ​​of variables in Corona SDK, HELP-ME PLEASE…

Here is my code used to compare:

   

 local bestscore = 0 &nbsp; &nbsp; local paraguardar = 0 &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; local bestscore = display.newText(bestscore, 300, 0, nil, 30) &nbsp; &nbsp; bestscore.isEditable = true &nbsp; &nbsp; bestscore.bestscore = bestscore &nbsp; &nbsp; bestscore.myName = bestscore &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; local function HeMoved(event, tap) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if event.phase == "began" then &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;local object = event.target &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; paraguardar = paraguardar + 1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return false &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; local function Comparando() &nbsp; &nbsp; &nbsp; &nbsp;if(bestscore \< paraguardar) then &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bestscore = paraguardar &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bestscore.text = paraguardar &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end &nbsp; &nbsp; &nbsp; &nbsp; end &nbsp; &nbsp;&nbsp;

    After…

    

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Comparando()

I took only the parts that might be giving error … 

Help me, please

bestscore is over written by a display object and no longer a number value. you need to use seperate variables for the score and the score object

how do I do bestscore be equal to the variable?

Please, help-me

Please continue the discussion here:
 

http://forums.coronalabs.com/topic/47537-how-to-compare-2-values-%E2%80%8B%E2%80%8Bof-variables/

Thanks

Rob

bestscore is over written by a display object and no longer a number value. you need to use seperate variables for the score and the score object

how do I do bestscore be equal to the variable?

Please, help-me

Please continue the discussion here:
 

http://forums.coronalabs.com/topic/47537-how-to-compare-2-values-%E2%80%8B%E2%80%8Bof-variables/

Thanks

Rob