This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Felype's profile picture

Help with backup program

Started by Felype, 01 January 2014 - 01:48 PM
Felype #1
Posted 01 January 2014 - 02:48 PM
I doing a backup program but when you put the name of the file this error appears: backup:6: attempt to perform arithmetic __div on table and string

Code of program:

print ("File backup Creator")
print ("Enter the name of the file.")
write("File: ")
program = read()
fs.copy("program", disk/"program")
gollark8 #2
Posted 01 January 2014 - 02:51 PM
I doing a backup program but when you put the name of the file this error appears: backup:6: attempt to perform arithmetic __div on table and string

Code of program:

print ("File backup Creator")
print ("Enter the name of the file.")
write("File: ")
program = read()
fs.copy("program", disk/"program")
Last line should be this:fs.copy(program,"disk/"..program)
Felype #3
Posted 01 January 2014 - 03:13 PM
I doing a backup program but when you put the name of the file this error appears: backup:6: attempt to perform arithmetic __div on table and string

Code of program:

print ("File backup Creator")
print ("Enter the name of the file.")
write("File: ")
program = read()
fs.copy("program", disk/"program")
Last line should be this:fs.copy(program,"disk/"..program)
Thanks. probably i will add you in Special Thanks.