Posted 12 December 2012 - 01:25 PM
Hey Pro's ^0^
ive been searching High and Low on the API's and forums for a type of Special API
Something that loads variables from a Text file
for example
lets say the api has
so if i wanted to do something like a custom password door lock id do
and the Variables file would look like
:3
ive been searching High and Low on the API's and forums for a type of Special API
Something that loads variables from a Text file
for example
lets say the api has
load.vars() -- Loads all variables from a Specific file
save.vars() -- Saves all set Variables to a Specific file
save.var() -- Saves a specific variable to a Specific file
so if i wanted to do something like a custom password door lock id do
pass = "5464" -- Default password if password var isnt set
passo = "5464o" -- Override password
load.vars("doorlock") -- Overwrites default password
while true do
redstone.setOutput("right", false)
term.clear()
term.setCursorPos(1, 1)
print("please enter password")
input = read("*")
if input == password then
redstone.setOutput("right", true)
sleep(5)
elseif input == passo then
term.clear()
print("please enter new password")
input2 = read()
save.var("data", "pass", input)
else
print("Invalid input: " input)
end
end
and the Variables file would look like
passo = 5464
pass = 5464
creator = Lithia
ect ect:3