CC: Tweaked

CC: Tweaked

42M Downloads

No output

devilish-crow opened this issue ยท 1 comments

commented

I get no output from my program, no errors, no logs, nothing. This is my code:

function CUI(m)
local n=1
local l=#m
while true do
term.clear()
term.setCursorPos(1,2)
for i=1, l, 1 do
if i==n then print(i, "["..m[i].."]") else print(i, m[i]) end
end
print("Select a number[arrow up/arrow down]")
local a, b= os.pullEventRaw()
if a == "key" then
if b==200 and n>1 then n=n-1 end
if b==208 and n<=l then n=n+1 end
if b==28 then break end
end
end
term.clear() term.setCursorPos(1,1)
return n
end

commented

You never call the function.