fileToBeChanged = (dSend)
function computerOneDisk()
start = false
localrun = false
filetrue = false
if event == "disk" then
write ("Disk located.")
term.setTextColor(colors.blue)
sleep(1)
print (" System loaded.")
start = true
end
term.setTextColor(colors.red)
print ("ERROR: No disk. Please insert correct disk to activate program.")
sleep(1)
term.setTextColor(colors.white)
computerOneDisk
if (start = true) then
function computerOneStart()
function computerOneMain()
end
term.setTextColor(colors.white)
if shell.resolve( "." )=="" then
print ("Running on computer.")
localrun = true
end
print ("Please run this program on your computer, and not a disk.")
computerOneStart
if (local run = true) then
function computerOneFileCheck()
end
term.clear()
term.setCursorPos(1,1)
term.setTextColor(colors.green)
print ("Program startup successful!")
term.setTextColor(colors.cyan)
sleep(0.5)
write ("Checking disk for ")
term.setTextColor(colors.red)
write ("dSend ")
term.setTextColor(colors.cyan)
print ("file…")
sleep(1)
local sDir = sPath:sub(dSend)
if not fs.exists( sDir ) then
term.setTextColor(colors.red)
print ("File non-exsistant. Creating file…")
fs.makeDir( sDir )
print ("File created.")
end
if fs.exists( sDir ) then
term.setTextColor(colors.green)
print ("File exists!")
sleep(0.5)
end
filetrue = true
computerOneFileCheck
if (filetrue = true) then
function computerOneSend()
end
term.setTextColor(colors.blue)
term.clear()
term.setCursorPos(1,1)
print ("FINAL SYSTEM STARTING UP…")
sleep(1)
while true do
print ("Enter message:")
input = read()
newmessage = (input)
local file = nil
local function computerOneREsave
file = fs.open( _sPath, "w" )
if file then
for n, sLine in ipairs( tLines ) do
file.write( newmessage )
end
computerOneREsave
end
while true do
if (file = newmessage) then
sleep(1)
end
load(sPath)
sleep(1)
end
computerOneSend
Please help!Thanks,
EDIT: This program was made when I was bad at programming! Don't judge me on it!