Posted 05 October 2012 - 08:43 PM
My code just prints 1 over and over as the variable, when it should be doing 1 then 2, then 4, then 8,16,32,64,128, then back to 1,2,4,8,16 and so forth, over and over, but my "debug" style thing that prints the variable is just saying 1 and 1 and 1 when it should be 1,2,4,8,16,32,64,128 :/ It should be easy, thanks!
Here's my code;
Here's my code;
local side = "back"
local num = 1
function s()
sleep(.2)
end
function glow()
if num < 128 then
local num = num + num
end
if num == 128 then
local num = 1
end
rs.setBundledOutput( side, num)
end
while true do
print(num)
s()
glow()
end