Posted 04 October 2013 - 12:19 PM
i'm making a program that lets you choose an option using arrow keys, but the function to print the "output" is not working
the code is this:
the code is this:
function draw(selected,options,simbols)
--creates the "draw" function
for i = 1, #options do
--runs the loop that prints the text
if i == selected then
--checks if the current option is the same number as the "selected" argument
print=(simbols[2].." "..options[i])
--if yes is, it prints the second simbol followed by the option
else
print=(simbols[1].." "..options[i])
--if not, it prints the first simbol followed by the option
end
end
end
draw(3,{"opt1","opt2","opt3"},{"-","+"})
--uses the "draw" function built earlier
it runs without errors, but it doesn't print anything. i have no clue on what it wrong with it, could anyone help?