This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
LabyStudio's profile picture

Help. term.setBackgroundColor(data.readAll())

Started by LabyStudio, 15 July 2013 - 01:37 PM
LabyStudio #1
Posted 15 July 2013 - 03:37 PM
"color" file:
Spoiler
2


local data = fs.open("color", "r")
if data then
term.setBackgroundColor(data.readAll())
data.close()
end

3: Expected number

please help :/
LBPHacker #2
Posted 15 July 2013 - 03:39 PM
You didn't provide any error message, but I assume you get something like "number expected". tunumber the input.
term.setBackgroundColor(tonumber(data.readAll()))
LabyStudio #3
Posted 15 July 2013 - 03:43 PM
You didn't provide any error message, but I assume you get something like "number expected". tunumber the input.
term.setBackgroundColor(tonumber(data.readAll()))



I have posted the error message.

thank you;)
Lyqyd #4
Posted 15 July 2013 - 05:15 PM
Change the title back to something useful.