i have used a program of the forum and changed it a little bit and its working fine, but i cant get the password hidden with *
i tried the pwchar but the it will not start anymore, and also how do i start it upon boot?
The pwchar parameter,when given,
causes input to be masked using the first charof the given string.For example, providing "*" will make all entered characters appear as stars.The returned value will still be the actual text inserted,of course.
i hope one of you guys can help me or implement it in the code i use
Here is the code
local component=require("component")local r=component.redstone
local gpu=component.gpu
local term=require("term")---- config section
local password="ucisrrc876"local delay=1--time the door stays open
local side=5--side of the door, test this-----local wrong=falsewhiletruedo
term.clear()
gpu.set(1,1,"UCIS Rocket Control Centre")
term.setCursor(1,2)
gpu.set(1,3,"Please enter password")if wrong then
gpu.set(1,1,"UCIS Rocket Control Centre")
term.setCursor(1,2)
gpu.set(1,3,"Please enter password")
wrong=falseend
term.setCursor(24,3)local input=io.read()if input==password then
r.setOutput(side,15)-- check ifthisis the correct function
os.sleep(delay)
r.setOutput(side,0)-- same here
else
wrong=trueendend
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Hi guys i have a question for you,
i have used a program of the forum and changed it a little bit and its working fine, but i cant get the password hidden with *
i tried the pwchar but the it will not start anymore, and also how do i start it upon boot?
i hope one of you guys can help me or implement it in the code i use
Here is the code
Sincerly
The Duke of Crawley
Link to post
Share on other sites