Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function SystemError(text,blueScreen)
- while true do
- if blueScreen == true then term.clear() term.setCursorPos(1,1) term.write("///////Crash//////") end
- for i = 1, #text do
- term.setCursorPos(1,i+3)
- term.clearLine()
- term.write(text[i])
- end
- term.setCursorPos(6,16)
- if blueScreen == true then term.write("press enter to shutdown") else term.write("press enter to continue") end
- local a, b = os.pullEvent("key")
- if b == keys.enter then
- if blueScreen == true then os.shutdown() else break end
- end
- end
- end
- function ApiCheck(list)--checks files for requested api, if any are missing, runs system error
- local Pass = 0
- local Status = {}
- for i = 1, #list do
- if fs.exists(fs.combine("API",list[i])) then Pass = Pass + 1 Status[i] = true else Status[i] = false end
- end
- local Copied = {"API check failed","files mentioned:"}
- for i = 1, #Status do
- Copied[i + 2] = (list.." found - "..Status[i])
- end
- if Pass < #list then SystemError(Copied,true) return false else return true end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement