lets go on whit another error
--[[Copyright Makerimages, all of the code here was made by makerimages and you may not distribute this code without written premission]]--
--set screen colours
term.clear()
term.setCursorPos(1,1)
term.setBackgroundColor(colors.lightBlue)
term.clear()
term.setBackgroundColor(colors.yellow)
local width=4
local size={term.getSize()}
for w=1,width do
term.setCursorPos(1,size[2]-w+1)
for x=1,size[1] do
write(' ')
end
end
--load apis and set more colors
term.setBackgroundColor(colors.lightBlue)
term.setCursorPos(1,3)
os.loadAPI("/APIS/mOSapi")
mOSapi.Logo()
sleep(5)
term.clear()
term.setBackgroundColor(colors.lightBlue)
term.clear()
term.setBackgroundColor(colors.yellow)
local width=4
local size={term.getSize()}
for w=1,width do
term.setCursorPos(1,size[2]-w+1)
for x=1,size[1] do
write(' ')
end
end
--set more colours
term.clear()
term.setBackgroundColor(colors.lightBlue)
term.clear()
term.setBackgroundColor(colors.yellow)
local width=4
local size={term.getSize()}
for w=1,width do
term.setCursorPos(1,size[2]-w+1)
for x=1,size[1] do
write(' ')
end
end
--check for user dir
fs.exists("/OS/Users") while false do
term.setBackgroundColor(colors.lightBlue)
term.setCursorPos(1,1)
print("Hang on! It seems that you do not have a user account set up yet! Lets do that now!")
print("Please select a Username:")
term.setTextColor(colors.white)
local newname=read("")
fs.makeDir("/OS/Users")
file=fs.open("/OS/Users"..newname,"a")
print("Please, choose a password to use in order to protect your account:")
local newpass=read("*")
n = tonumber(newpass) -- try to convert it to a number
if n == nil then
print("Whoops, cannot encrypt password")
else
print("password set!")
file.write(n)
end
end
this is supposed to set screen colours and then chack if a directory exists, if it doesnt exist its supposed to make one and ask the user to seta username, then it is supposed to make a file in the /os/Users dir with the name of that username, then ask for password, turn it into a nr and write that in the file, it currently only sets the colors, then ends…
How to fix