Jump to content




Window 151: bios:80: error


  • You cannot reply to this topic
2 replies to this topic

#1 DrCas

  • Members
  • 9 posts

Posted 03 April 2016 - 06:31 PM

I've created a code but it generates an error and shutsdown the computer afterwards. I don't know what's wrong but here it is:
term.setCursorPos(1, 1)
term.setBackgroundColor(colors.grey)
term.clear()
term.setCursorPos(1, 1)
term.setBackgroundColor(colors.blue)
term.clearLine()
term.setCursorPos(4, 1)
term.write("Welcome to CraneStation")
term.setCursorPos(1, 2)
term.write("Oxygen: .....")
term.setCursorPos(1, 3)
term.write("Be happy and enjoy your stay")

if redstone.getInput("left") == true then
term.setCursorPos(1, 2)
term.setBackgroundColor(colors.green)
term.write("Oxygen: OK					 ")
else
term.setCursorPos(1, 2)
term.setBackgroundColor(colors.red)
term.write("Oxygen: Error				  ")
end

The error I get is:
window:151: bios:80: bad argument: string expected, got nil

Anything I can do?

#2 Dog

  • Members
  • 1,179 posts
  • LocationEarth orbit

Posted 03 April 2016 - 06:38 PM

I *think* it's your colors.grey (line 2). IIRC it's either colors.gray or colours.grey (note the spelling)

Edited by Dog, 03 April 2016 - 06:38 PM.


#3 DrCas

  • Members
  • 9 posts

Posted 03 April 2016 - 06:39 PM

View PostDog, on 03 April 2016 - 06:38 PM, said:

I *think* it's your colors.grey (line 2). IIRC it's either colors.gray or colours.grey (note the spelling)
I knew it was that simple! Thanks!





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users