I'm newbie in LUA. I want to simple display some time vaule
string_buf = string.format ( "%dh %dmin" ,Mode[2]/60,Mode[2]%60 )
But my device still inform me that at this line "#2 number has no integer representation". I find info that problem is that modulo give float. So I try to change it for
a= math.floor(Mode[2]%60)
string_buf = string.format ( "%dh %dmin" ,Mode[2]/60,a )
Result are the same. If I try to display this value as print in console then I see nice integer value- no matter If I made floor or not. Device and simulation in fact not work when rest from divide is not equal to 0