Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Thu Apr 30, 2015 11:05 pm Post subject: Convert number to string and put into a CELabel |
|
|
I want show timer countdown process in form trainer as a label caption.
While test with print statement its work until " print(y) " and get error at
"control_setCaption(CELabel1, y)".
Please help to fix it.
Code: |
function CEButton1Click(sender)
tmr = tonumber(control_getCaption(UDF1.CEEdit1))
t.Interval=tmr
--- print(tmr)
x = tmr/1000
--- print(x)
for i = x, 0, -1 do
--- print(i)
y = tostring(i)
print(y)
control_setCaption(CELabel1, y)
end
t.Enabled=true
end
function resetTm()
if (t) then
t.Enabled=false
end
end
t=createTimer(nil, false)
t.onTimer=resetTm
|
Thank you
|
|