Okay, having a few problems.
I want the system to read from a table inside a table. So, I have two for statements that run through all of the x positions for a y value, then moves on to the next y value. And, then, I have your for statement from above to read each character in the set. Currently, the sets of characters are set up as five characters as different values in the y lines sections of the main table. However, when I try to draw a pixel or set the cursor position, it says that the number of the x and y lines it is on (from the first two for statements) aren't numbers. I worked out why this wasn't working, but I can't work out how to get the number of the value of the x and y values it is on. These would be used to draw the pixel and to set the cursor position.
If you understood any of that, could you help me please?
CODE:
function main()
os.loadAPI("test")
for kv, v in pairs(test.cols) do
for ki, i in pairs(v) do
if #i == 5 then
for kt=1, #i do
local char = string.sub(i,k,k)
if ki==1 then
local colour = colFind(char)
print(ki.." > "..kv)
--paintutils.drawPixel(tonumber(i),tonumber(v),colour)
elseif ki==2 then
local colour = colFind(char)
--term.setTextColor(colour)
elseif ki==3 then
--term.setCursorPos(tonumber(i),tonumber(v))
--print(char)
end
end
end
end
end
end
Thanks,
- Sam