Automatically download Pastebin programs
Barlender 09 Jul 2015
Ok, so I am trying to create a program which uses pastebin links to download other programs onto the computer. I've seen this method done with other programs, I just never actually saw the command to do so.
The command which I attempted to use was:
The error I got when I ran this program was "bios:339: [string "startup"]:1: unexpected symbol". I assume the unexpected symbol refers to the "~", but I am not sure. Any help would be much appreciated.
The command which I attempted to use was:
if fs.exists("<program name>") ~= then shell.run("pastebin get <pastebin code> <program name>") end
The error I got when I ran this program was "bios:339: [string "startup"]:1: unexpected symbol". I assume the unexpected symbol refers to the "~", but I am not sure. Any help would be much appreciated.
Square789 09 Jul 2015
Very simple, you just compared the returned value with...nothing
The compiler expected the end of the statement with the brackets, but then you just put an operator there.
I'd use
Same with <pastebin code>, replace this with
Edited by Square789, 09 July 2015 - 02:27 PM.
The compiler expected the end of the statement with the brackets, but then you just put an operator there.
I'd use
if not fs.exists(filename) thenAlso, don't use a string in the fs.exists()-function ("<program name>") but a variable.
Same with <pastebin code>, replace this with
shell.run("pastebin get "..pastecode.." "..filename)
Edited by Square789, 09 July 2015 - 02:27 PM.
KingofGamesYami 09 Jul 2015
meigrafd, on 09 July 2015 - 02:49 PM, said:
Have a look on this: https://github.com/s...r/bootstrap.lua
That really isn't relevant to the error in question. It's his file that's causing problems.
Barlender 10 Jul 2015
Square789, on 09 July 2015 - 02:24 PM, said:
Very simple, you just compared the returned value with...nothing
The compiler expected the end of the statement with the brackets, but then you just put an operator there.
I'd use
Same with <pastebin code>, replace this with
The compiler expected the end of the statement with the brackets, but then you just put an operator there.
I'd use
if not fs.exists(filename) thenAlso, don't use a string in the fs.exists()-function ("<program name>") but a variable.
Same with <pastebin code>, replace this with
shell.run("pastebin get "..pastecode.." "..filename)
I tried your suggestion, and it worked! Also thank's for suggesting that I use a variable rather than a string, that was another issue I was having Thanks for the help