Posted 27 June 2014 - 09:08 AM
Ok all of the text in my startup file if entirely made out of blocks
here is a screenshot(It is supposed to say "Welcome To SYS-OS""[User]")
and here is the code
here is a screenshot(It is supposed to say "Welcome To SYS-OS""[User]")
and here is the code
term.clear()
term.setCursorPos(1,1)
if term.isColor() == true then
term.setTextColor(colors.lime)
print("COMPUTER IS ADVANCED [ OK ]")
else
print("ERROR: NOT ADVANCED COMPUTER [ ERROR ]")
print("Please reinstall on advanced computer!")
print("Shutting Down...")
sleep(3)
os.shutdown()
end
if os.loadAPI("APIS/boot") == true then
term.setTextColor(colors.lime)
print("Boot API loaded successfully [ OK ]")
sleep(.25)
else
term.setTextColor(colors.red)
print("ERROR: COULD NOT LOAD BOOT API [ ERROR ]")
sleep(1)
os.reboot()
end
if os.loadAPI("APIS/text") == true then
term.setTextColor(colors.lime)
print("Text API loaded successfully [ OK ]")
sleep(.25)
else
term.setTextColor(colors.red)
print("ERROR: COULD NOT LOAD TEXT API [ ERROR ]")
sleep(1)
os.reboot()
end
if os.loadAPI("APIS/gameutils") == true then
term.setTextColor(colors.lime)
print("GameUtils API loaded successfully [ OK ]")
sleep(1)
else
term.setTextColor(colors.red)
print("ERROR: COULD NOT LOAD GAMEUTILS API [ ERROR ]")
sleep(1)
os.reboot()
end
if os.loadAPI("APIS/sha") == true then
term.setTextColor(colors.lime)
print("SHA API loaded successfully [ OK ]")
sleep(1)
else
term.setTextColor(colors.red)
print("ERROR: COULD NOT LOAD SHA API [ ERROR ]")
sleep(1)
os.reboot()
end
if os.loadAPI("APIS/login") == true then
term.setTextColor(colors.lime)
print("Login API loaded successfully [ OK ]")
sleep(1)
else
term.setTextColor(colors.red)
print("ERROR: COULD NOT LOAD LOGIN API [ ERROR ]")
sleep(1)
os.reboot()
end
if os.loadAPI("APIS/ccconfig") == true then
term.setTextColor(colors.lime)
print("CC-Config API loaded successfully [ OK ]")
sleep(.25)
else
term.setTextColor(colors.red)
print("ERROR: COULD NOT LOAD CC-CONFIG API [ ERROR ]")
sleep(1)
os.reboot()
end
if os.loadAPI("APIS/screensaver") == true then
term.setTextColor(colors.lime)
print("Screensaver API loaded successfully [ OK ]")
sleep(.25)
else
term.setTextColor(colors.red)
print("ERROR: COULD NOT LOAD SCREENSAVER API [ ERROR ]")
sleep(1)
os.reboot()
end
term.clear()
boot.bootImg()
boot.bootText()
sleep(2)
function login()
text.clearBlue()
lbground=paintutils.loadImage("img/login.nfp")
paintutils.drawImage(lbground, 1, 1)
term.setCursorPos(2,2)
print("Welcome To SYS-OS")
term.setCursorPos(2,3)
print("[User]")
local username=read()
if fs.exists("Home/"..username.."/"..username..".acc") then
local u=fs.open("Home/"..username.."/"..username..".acc","r")
local privelege=u.readLine()
local pass=u.readLine()
u.close()
term.setCursorPos(2,5)
print("[Password]")
local password=read("*")
local pass2=sha.sha256(password)
if pass==pass2 then
if privelege=="true" then
root=true
else
root=false
end
user=username
shell.run("system/main.sys")
else term.setBackgroundColor(colors.red)
term.clear()
term.setCursorPos(1,1)
text.centerPrint("WRONG PASSWORD")
sleep(5)
os.reboot()
end
else term.setBackgroundColor(colors.red)
term.clear()
term.setCursorPos(1,1)
text.centerPrint("WRONG USERNAME")
sleep(5)
os.reboot()
end
end
local ok, err=pcall(login)
if not ok then
text.clearBlue()
term.setBackgroundColor(colors.lime)
term.clear()
term.setCursorPos(1,1)
text.centerPrint("SYS-OS has crashed!")
text.centerPrint("SYS-OS has crashed and was forced to shutdown.")
text.centerPrint("")
text.centerPrint("If you haven't edited any system")
text.centerPrint("files then please contact Glass Systems or")
text.centerPrint("Black Whole Software on the ComputerCraft forums")
text.centerPrint("")
text.centerPrint("If you have edited system files")
text.centerPrint("then reinstall SYS-OS, or ask the forums")
text.centerPrint("")
text.centerPrint("[ERROR]")
text.centerPrint("?"..err)
text.centerPrint("")
text.centerPrint("")
text.centerPrint("Press any key to continue...")
while true do
local sEvent=os.pullEvent()
if sEvent=="key" then
os.reboot()
end
end
end
i did not steal the code from Glass UI or Glass OS I am working with glass Systems on SYS-OS if you need anything ask meEdited on 27 June 2014 - 07:10 AM