Posted 07 March 2014 - 03:31 AM
I'm trying to make it so that if you enter a letter, then it'll print out some words, but I can't figure out how to print out a whole table, and I can't find any other topics that seem to help.
This is what I have so far:
As of right now, when I enter a, it just sets the CursorPos to 1,1 and does nothing else. It doesn't even clear the a that I entered.
Any help would be greatly appreciated. :)/>
This is what I have so far:
term.clear()
local mytable = {"Oak Logs","Iron Ore","Snow Blocks"}
while true do
rank = read()
term.setCursorPos(1,1)
term.setBackgroundColor(colors.black)
if rank==a then
term.clear()
term.setTextColor(colors.red)
print("Rank A Mine")
term.setTextColor(colors.green)
print(mytable[1])
print(mytable[2])
print(mytable[3])
sleep(5)
end
end
As of right now, when I enter a, it just sets the CursorPos to 1,1 and does nothing else. It doesn't even clear the a that I entered.
Any help would be greatly appreciated. :)/>