Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- ==== Concept: Xegstery (Data Table Structure) API ==== --
- -- ====-By XILION Also Called Atom888-==== --
- -- VariableTypes: "lua"
- -- Directory Path Locating : [<keyname>][1][<keyname>][1]
- dat = fs.open("/xeg","r")
- data = data.readAll()
- dat.close()
- -- dirpathfunc : "function() <xegpath> = val end"
- function configDir(contentfunc,dirpathfunc)
- dat = fs.open("/xeg","r")
- data = dat.readAll()
- dat.close()
- content = contentfunc()
- content[2] = "dir"
- content[3] = nil
- content[4] = true
- dirpathfunc()
- dat = fs.open("/xeg","r")
- dat.write(data)
- dat.close()
- end
- -- readpathfunc : "function() return <"data"xegpath>"
- function readData(readpathfunc)
- dat = fs.open("/xeg","r")
- data = data.readAll()
- dat.close()
- rtn = readpathfunc()
- rdt = rtn[1]
- if rtn[2] == "var" then
- if rtn[4] then
- return rdt
- else
- return "XEGERROR:DATA FROM PATH "..rtn.." NOT AVAILIBLE. TechData: TableValueDataArg[1] , AvalibilatyConfig: "..rtn.."[4]"
- end
- else
- return "XEGERROR:KEYTYPE "..rtn.." INVAILD. TechData: keytypeConfig: "..rtn.."[2]"
- end
- end
- -- vardatlistfunc : "function() return <dataVarList: "[<value>,<keytype "var","dir"><if type= var (<variableType *More Data At Beginning*>)>,<availible true/false>]">"
- -- mainprocesfunc : "function() <"data"xegpath> = val end"
- function configDataX(vardatlistfunc,mainprocesfunc)
- dat = fs.open("/xeg","r")
- data = data.readAll()
- dat.close()
- val = vardatlistfunc()
- mainprocesfunc()
- dat = fs.open("/xeg","r")
- dat.write(data)
- dat.close()
- return "OK."
- end
- -- vallist : "function() return <valueList: "[<value>,<variableType>]"> end"
- -- prfunc : "function() <xegpath> = value end"
- function configDat(vallist,prfunc)
- dat = fs.open("/xeg","r")
- data = data.readAll()
- dat.close()
- value = vallist
- value[2] = value[3]
- value[2] = "var"
- value[4] = true
- prfunc()
- dat = fs.open("/xeg","r")
- dat.write(data)
- dat.close()
- end
Advertisement
Add Comment
Please, Sign In to add comment