Posted 21 January 2016 - 11:50 AM
okay, well I spent a long time making an "anti-virus" for computercraft, and well long story short is doesn't work, so here's the script.
oh! one more thing, when i run the script it gives me this error bios.lua :14: [string ".temp" :7: 'then' expected
term.clear()
term.setCursorPos(1,1)
term.setTextColor( colors.lime )
print ("Anti-Virus 1.0")
term.setTextColor( colors.white)
sleep(1)
if fs.exists("startup") = = true then
term.setCursorPos(1,2)
print ("Restoring Computer. . .")
fs.delete("startup")
fs.copy("disk/Restorer","startup")
sleep(2)
print ("Restord Computer! Rebooting. . .")
sleep(2)
disk.eject("left")
disk.eject("right")
disk.eject("back")
disk.eject("top")
disk.eject("bottom")
os.reboot()
else
term.setCursorPos(1,1)
print ("Anti-Virus 1.0")
sleep(1)
term.setCursorPos(1,2)
print ("No Restoring Needed")
end
(restorer file, if your wondering)
term.clear()
term.setCursorPos(1,1)
term.setTextColor( colors.lime )
print ("Anti-Virus 1.0")
term.setTextColor( colors.white )
sleep(1)
print ("Thank you for using 11516's Anti-Virus")
oh! one more thing, when i run the script it gives me this error bios.lua :14: [string ".temp" :7: 'then' expected
term.clear()
term.setCursorPos(1,1)
term.setTextColor( colors.lime )
print ("Anti-Virus 1.0")
term.setTextColor( colors.white)
sleep(1)
if fs.exists("startup") = = true then
term.setCursorPos(1,2)
print ("Restoring Computer. . .")
fs.delete("startup")
fs.copy("disk/Restorer","startup")
sleep(2)
print ("Restord Computer! Rebooting. . .")
sleep(2)
disk.eject("left")
disk.eject("right")
disk.eject("back")
disk.eject("top")
disk.eject("bottom")
os.reboot()
else
term.setCursorPos(1,1)
print ("Anti-Virus 1.0")
sleep(1)
term.setCursorPos(1,2)
print ("No Restoring Needed")
end
(restorer file, if your wondering)
term.clear()
term.setCursorPos(1,1)
term.setTextColor( colors.lime )
print ("Anti-Virus 1.0")
term.setTextColor( colors.white )
sleep(1)
print ("Thank you for using 11516's Anti-Virus")
Edited on 22 January 2016 - 11:32 PM