14 posts
Posted 01 October 2015 - 03:16 PM
I made a program to backup all your files and folders to a single pastebin file! Simply run this program, type save to save all your data to pastebin, and type load to load all files from a pastebin code. To download:
pastebin get NHkyjCTr market
market
Search Market: pastebin
Choose "Pastebin Backup"
Specify a file name to download to
353 posts
Location
Orewa, New Zealand
Posted 02 October 2015 - 01:08 AM
After selecting pastebin backup in market search (1), I get an error immediately.
I am running on ComputerCraft 1.74 and the error is:
Line 50
Attempt to index ? (A nil value)
The error line seems to be grabbing something from pastebin, and then trying to read it. However you have not protected your program from a nil value. If the 'pb' variable returns nil, your program will crash.
Maybe change it to something like this:
write("Filename: ")
pb=http.get("http://www.pastebin.com/raw.php?i="..marketitems[n].pastebinaddress)
if pb then
contents=pb.readAll()
pb.close()
f=fs.open(read(),"w")
f.write(contents)
f.flush()
f.close()
else error("Failed to fetch program from pastebin") end
This will always error 'Failed to fetch… yadada'. Maybe double check the pastebin address it is using?
I might be at fault here, but it is more probable that the pastebin ID doesn't exist and you perhaps didn't test it…
Edited on 01 October 2015 - 11:08 PM
7083 posts
Location
Tasmania (AU)
Posted 02 October 2015 - 11:17 AM
I might be at fault here, but it is more probable that the pastebin ID doesn't exist and you perhaps didn't test it…
No, you're right,
the paste has apparently been removed.
14 posts
Posted 03 October 2015 - 04:17 PM
IDK why it's removed, I didn't remove it. I used pastebin put to upload it. Should I have used my pb account?
314 posts
Location
Glass/UX/main.lua
Posted 03 October 2015 - 04:57 PM
IDK why it's removed, I didn't remove it. I used pastebin put to upload it. Should I have used my pb account?
It might have been auto-flagged for spam,altough it *should* tell you that. Try using your pastebin account,that usually helps.
7083 posts
Location
Tasmania (AU)
Posted 03 October 2015 - 11:56 PM
*should*
Even if you
do use your account to upload something, if Pastebin's system decides it's spam, you won't get notified in any way when they remove it.
But yes, I'll certainly agree that you "should" be notified.
14 posts
Posted 04 October 2015 - 02:58 PM
Try using your pastebin account,that usually helps.
I said should I
have because the server I was on to make the backup program reset, and I forgot to save the program to my SSD.
314 posts
Location
Glass/UX/main.lua
Posted 04 October 2015 - 05:04 PM
Try using your pastebin account,that usually helps.
I said should I
have because the server I was on to make the backup program reset, and I forgot to save the program to my SSD.
Oh,that's a shame :(/>
(also,you had to backup a backup program? Kinda ironic )