Jump to content




Help with backup program


2 replies to this topic

#1 Felype

  • Members
  • 43 posts
  • LocationBrazil

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")


#2 gollark8

  • Members
  • 207 posts

Posted 01 January 2014 - 02:51 PM

View PostFelype, on 01 January 2014 - 02:48 PM, said:

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)

#3 Felype

  • Members
  • 43 posts
  • LocationBrazil

Posted 01 January 2014 - 03:13 PM

View Postgollark8, on 01 January 2014 - 02:51 PM, said:

View PostFelype, on 01 January 2014 - 02:48 PM, said:

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.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users