pastebin:101: attempt to index ? (a nil value)
10 replies to this topic
#1
Posted 22 January 2014 - 12:49 AM
The program "pastebin" errors with:
#2
Posted 22 January 2014 - 03:07 AM
You probably overwritten the program yourself, because pastebin works for me and everyone else who don't have a modified pastebin
#3
Posted 22 January 2014 - 03:53 AM
Can't really overwrite a program in rom/programs, as it is read-only. Unless he did it externally i guess. He could however have put a program named pastebin in the root folder.
Try running edit pastebin and see if there's anything in the file.
Try running edit pastebin and see if there's anything in the file.
#4
Posted 22 January 2014 - 04:51 AM
It could be a replacement in root, or an overridden function. But I think it's rather more likely that he just threw some parameters at it that it can't make sense of.
What exactly led up to that error? You've only told a fraction of the story, Flick.
What exactly led up to that error? You've only told a fraction of the story, Flick.
#5
Posted 22 January 2014 - 05:20 AM
Yea, taking a look at the pastebin file reveals this:
Which seems an unlikely error really, unless the path you're providing is full of weird characters maybe. You've probably got a custom rom or something. The programs are pretty well built to prevent errors.
-- GET the contents from pastebin
local res = get(sCode)
if res then
local file = fs.open( sPath, "w" )
file.write( res ) --this is line 101
file.close()
print( "Downloaded as "..sFile )
end
Which seems an unlikely error really, unless the path you're providing is full of weird characters maybe. You've probably got a custom rom or something. The programs are pretty well built to prevent errors.
#6
Posted 22 January 2014 - 05:31 AM
Judging by the code Oeed posted, this might be the result of trying to save a paste to a non-existant folder.
#7
Posted 22 January 2014 - 05:47 AM
CometWolf, on 22 January 2014 - 05:31 AM, said:
Judging by the code Oeed posted, this might be the result of trying to save a paste to a non-existant folder.
I just tried doing that, it throws a different error (line 92). But that's something that should be fxied.
For everyone's reference, here's the code of the vanilla pastebin (1.56).
Spoiler
It's even numbered
I keep a copy of the rom in a folder, it's very useful to reference. Especially if you don't have access to the wiki.
Edited by oeed, 22 January 2014 - 05:48 AM.
#8
Posted 22 January 2014 - 10:12 AM
Moved to Ask a Pro. Try reproducing this on a computer with no startup file after a fresh boot.
#9
Posted 31 January 2014 - 05:40 PM
Works now! Thanks for trying to help. Could this please be locked?
#10
Posted 31 January 2014 - 06:06 PM
Flick, on 31 January 2014 - 05:40 PM, said:
Works now! Thanks for trying to help. Could this please be locked?
I've already done it, but in the future click the 'Report' button in the bottom right of the post and type 'Please lock this'.
Edited by oeed, 31 January 2014 - 06:06 PM.
#11
Posted 31 January 2014 - 06:48 PM
We generally don't lock Ask a Pro threads anyhow.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











