Posted 29 June 2012 - 07:55 PM
i am trying to make a program that indexes a website and then reads and executes a program on that site but i keep getting a examplecode:9: attempt to index? (a nil value)
here is the code:
if http == nil then
print('Please enable the http api.')
print('Look for enableAPI_http=0 in .minecraft/config/mod_ComputerCraft and change the zero to a one and then restart Minecraft')
return false
end
urlBase = 'http://examplesite.com'
package.get(file)
package.load(file)
shell.run(file)
what did i do wrong?
here is the code:
if http == nil then
print('Please enable the http api.')
print('Look for enableAPI_http=0 in .minecraft/config/mod_ComputerCraft and change the zero to a one and then restart Minecraft')
return false
end
urlBase = 'http://examplesite.com'
package.get(file)
package.load(file)
shell.run(file)
what did i do wrong?