Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --CIaPDOR
- --Central Interface and Personality Disk Operating Reader
- --//Basic Formats//
- --colon is used to define B as A (A:B, ex. "Funct:Setup" defines B as a Function)
- --semi colon is used to add Variables or arguements to a statement(A;B, ex. "Funct:PrintItem;Var1:Y;Var2:text)
- --[]brackets are used to grab, set, or erase the variable at the desired position of a list
- --()
- --{} is used to define a list and its contents, to define a list that has no variables you would need to do A:{}, for defining a list with preset items you would need to do A:{B,C,etc}
- --//functions//
- --To start a function you need to first do "Funct:A", if you want the function to use predefined variables you would need to add a semi colon then do "A:B" replace A with the name of the variable would be in the function and B with the desired variable.
- --to end a function you need to do "Funct:(name);end"
- --to call a function you need to do "Call:(name)", to call a function with a variable add ";(Variable)", repeat for each variable desired
- --//Operators//
- --==Math
- --==Rednet
- --==Peripherals
- --==Memory
- --==
- --//ProgramProper//
- --dont mess with anything below here
- local User_Menu = "home"
- local User_Pos = 1
- local DiskState = -1 -- -1 = empty, 0 = incompatible disk, 1 = compatible disk, 2 = disk in use
- local SystemPath = "n"
- local Display_MPos = 1
- local Display_Text = {}
- function Main()
- parallel.waitForAny(Display,Loop)
- os.reboot()
- end
- function Display()
- while true do
- if User_Menu == "home" then
- Display_Text = {{"run disk",
- elseif User_Menu == "settings" then
- elseif User_Menu == "setup" then
- end
- term.clear()
- function ReadDisk()
- local file = fs.open(SystemPath,"r")
- local Functions = {}
- local Variables = {}
- local Content
- local FunctionI = 1
- local ReadingFunction = false
- repeat
- Content = file.readLine()
- if Content ~= "END" then
- if Content.find("Funct:") then
- if Content.find(";end") then
- FunctionI = FunctionI + 1
- ReadingFunction = falsw
- else
- Functions[FunctionsI][1] = Content.sub(Content.find("Funct:") + 1, Content.find(";") -1)
- ReadingFunction = true
- end
- elseif
- end
- if ReadingFunction == true then
- Functions[FunctionI][#Functions[FunctionI]] = Content
- end
- end
- until Content == "END"
- while true do
- local event, a, b, c, d = os.pullEvent("Disk_Operation")
- for i = 1, #Functions do
- if a == Functions[i][1] then
- RunFunction(Functions[i])
- end
- end
- end
- end
- function RunFunction(List)
- for i = 2, #List.len -1 do
- if List[i][1] == "Math" then
- elseif List[i][1] == "Rednet" then
- elseif List[i][1] == "Peripheral" then
- elseif List[i][1] == "Memory" then
- elseif List[i][1] == "Power" then
- end
- end
- end
Add Comment
Please, Sign In to add comment