1 posts
Posted 18 November 2012 - 02:22 PM
I'm attempting to add a computer to a TNT cannon with deployers to refill the cannon but for some reason i keep getting the error message: "Loading :9: attempt to call nil" the code reads this:
os.pullEvent = os.pullEventRaw
print ("Ready to load")
write("")
x = io.read()
if x == "load" then
redstone.setOutput ("right", true )
print ("Loading")
sleep(2)
redstone.setOutput ("right", false )
sleep(1)
shell.run "Fire"
end
Its been so long since i've done this i hardly remember how to fix this stuff.
Thx
Edited by
2088 posts
Location
South Africa
Posted 18 November 2012 - 02:40 PM
Wow spam :/
Try make shell.run "Fire" into shell.run("Fire")
1688 posts
Location
'MURICA
Posted 18 November 2012 - 02:42 PM
I can't seem to find any errors in this. Post the code of your "fire" program - maybe it's in there.
Wow spam :/
Try make shell.run "Fire" into shell.run("Fire")
For some reason I knew someone would say this, even though it's perfectly valid.
2088 posts
Location
South Africa
Posted 18 November 2012 - 02:49 PM
I can't seem to find any errors in this. Post the code of your "fire" program - maybe it's in there.
Wow spam :/
Try make shell.run "Fire" into shell.run("Fire")
For some reason I knew someone would say this, even though it's perfectly valid.
Yeah I also thought it was valid, but I couldn't see anything else wrong with the code…
Edit: It does work, just tested. OP, you must have bugged CC somehow by editing main files?
1054 posts
Posted 18 November 2012 - 03:18 PM
The program seems to be called 'Loading', not 'Fire', so it could be in the code for fire?
1688 posts
Location
'MURICA
Posted 18 November 2012 - 03:20 PM
As far as I know, using shell.run returns the error for the program that used shell.run, and not the run program itself. I might be wrong though.
Even then, line 9 is the first "redstone.setOutput" line, and I don't see anything wrong with that. :/
2088 posts
Location
South Africa
Posted 18 November 2012 - 05:09 PM
Even then, line 9 is the first "redstone.setOutput" line, and I don't see anything wrong with that. :/
Yeah, there's nothing wrong with his code.
To OP: Try reinstalling the whole of CC Mod.
8543 posts
Posted 18 November 2012 - 06:33 PM
Please make sure that this code is exactly the code you're using and that you didn't automatically correct a typo when you retyped it on the forums (if that's what you did).