Answer to Question #46354 in AJAX | JavaScript | HTML | PHP for Landon

Question #46354
does anyone see anything wrong with this code?

local wW = platform.window:width()
local wH = platform.window:height()
local Blink = false
local Clr = 0
local Clg = 0
local Clb = 0
timer.start(.01)

function on.paint (gc)
gc:setColorRGB(0, 0, 0)
gc:fillRect(0, 0, wW, wH)
gc:setColorRGB(Clr, Clg, Clb)
gc:drawRect(0, 0, wW - 1, wH - 1)
end

function on.timer

if Blink == false then
Blink = true
else
Blink = false
end


if Blink == true then
Clr = 0
Clg = 255
Clb = 0
else
Clr = 255
Clg = 0
Clb = 0
end

platform.window:invalidate()
end
1
Expert's answer
2014-09-24T03:53:17-0400
Dear visitor,
Blink is a local undefined variable.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

Assignment Expert
13.10.14, 11:22

Dear Lua. Questions in this section are answered for free. We can't fulfill them all and there is no guarantee of answering certain question but we are doing our best. And if answer is published it means it was attentively checked by experts. You can try it yourself by publishing your question. Although if you have serious assignment that requires large amount of work and hence cannot be done for free you can submit it as assignment and our experts will surely assist you

landon
11.10.14, 02:05

what do you mean sorry ive only been programming for around a month now

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS