Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • Announcements

    • Lizzy Trickster

      Latest Stable OpenComputers Version   11/26/16

      The latest released version of OpenComputers is version 1.7.1 for MC 1.7.10, 1.10.2, 1.11.2 & 1.12.1. See more information here! Beta/Dev builds can be found at the Jenkins Build Server (ci.cil.li)
titanlock

Having issue with having a script in /boot

Recommended Posts

I am trying to write a login program and have put it into the /boot directory but I get this error:

/lib/tools/boot.lua:71: /lib/term.lua:104: attempt to compare nil to number

 

Here is my Code:
 

local io = require("io")
local term = require("term")

term.clear()

while true do
	io.write("Password:")
	pass = io.read()
	if pass == "pass" then
  		print("Welcome!")
  		break
	else
  	print("Try again")
	end
end

 

I am new to lua so I have no idea what this error is telling me. Can someone please help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×