Bomb Bloke, on 01 June 2014 - 02:32 AM, said:
92:
You guys are misreading the error - an "attempt to index nil" doesn't mean that something like args[2] is nil, it means that something like args is nil. That can't be true, so presumably it doesn't like the attempt to index "readAll" from within "http.get()". Or "get" from within "http".
This could mean the http API isn't enabled, or that there's some other problem with the attempt to get the website handle.
It's a bad idea to do the "get" and the "read" on one line anyway. That means you don't retain the handle, which you should be closing after the read (impossible if you didn't keep the pointer):
Though I'm still suspecting the error is happening within some API this script is calling - I'd expect the full error to include information about the name of the file within which the error occurred.
app.write(http.get( "https://raw.githubusercontent.com/iansapelino/islxcc/master/Programs/"..args[2] ).readAll())
You guys are misreading the error - an "attempt to index nil" doesn't mean that something like args[2] is nil, it means that something like args is nil. That can't be true, so presumably it doesn't like the attempt to index "readAll" from within "http.get()". Or "get" from within "http".
This could mean the http API isn't enabled, or that there's some other problem with the attempt to get the website handle.
It's a bad idea to do the "get" and the "read" on one line anyway. That means you don't retain the handle, which you should be closing after the read (impossible if you didn't keep the pointer):
local webHandle = http.get( "https://raw.githubusercontent.com/iansapelino/islxcc/master/Programs/"..args[2] ) app.write(webHandle.readAll()) webHandle.close()
Though I'm still suspecting the error is happening within some API this script is calling - I'd expect the full error to include information about the name of the file within which the error occurred.
THANK YOU!!











