This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Corky_McDuff's profile picture

Server move broke program

Started by Corky_McDuff, 31 March 2015 - 07:22 PM
Corky_McDuff #1
Posted 31 March 2015 - 09:22 PM
Hope you can help please as we are trapped between decks lol

Turbo lift program has stopped working since we moved to a new server.
Getting the following error;
parallel :22: Turbo:12: attempt to index ? (a nil value)

Pastebin code is q23XrMff

Your help as always is greatly appreciated!
Creator #2
Posted 31 March 2015 - 09:25 PM
Maybe you are not allowed to wrap command block in this server, so the command does not exst for the object you created.
Wojbie #3
Posted 31 March 2015 - 09:31 PM
Did you change any mods on server change? Got never CC version? Could be open-peripherals?
Corky_McDuff #4
Posted 31 March 2015 - 09:40 PM
ok, checked with server admin and nothing is restricted and command block use is checked.

I don't believe anything changed when we moved. Not sure how I would check that now.
MKlegoman357 #5
Posted 31 March 2015 - 09:46 PM
Either command blocks are disabled in ComputerCraft.cfg or there is no command block below the computer.
Edited on 31 March 2015 - 07:46 PM
Corky_McDuff #6
Posted 31 March 2015 - 09:55 PM
ok, then it must be disabled because there is definitely a block present…it used to work fine also.
I changed the time using the command block, so that worked, but not sure that is a true test.
valithor #7
Posted 31 March 2015 - 09:59 PM
ok, then it must be disabled because there is definitely a block present…it used to work fine also.
I changed the time using the command block, so that worked, but not sure that is a true test.

If you changed it with the computer then yes the api is enabled (commandblocks can be enabled and the api can not be, they are two seperate things). Here is a test to see if it is enabled.


cb = peripheral.wrap(side)
if cb then
  print("Api is enabled")
else
  print("Api is not enabled")
end
Edited on 31 March 2015 - 08:00 PM
Corky_McDuff #8
Posted 31 March 2015 - 10:13 PM
Thank you, tried your test program and getting "peripheral :20: Expected string"
valithor #9
Posted 31 March 2015 - 10:29 PM
Thank you, tried your test program and getting "peripheral :20: Expected string"

Forgot to say you have to replace side with the side the commandblock is on sorry.
Corky_McDuff #10
Posted 31 March 2015 - 10:31 PM
That's ok, I guessed that and changed it, but that was what I got :)/>
HPWebcamAble #11
Posted 31 March 2015 - 11:50 PM
That's ok, I guessed that and changed it, but that was what I got :)/>

It needs quotes too

peripheral.wrap("left") --# Yes

peripheral.wrap(left) --# No
Corky_McDuff #12
Posted 01 April 2015 - 03:03 PM
Oops, oh yeah.

..and the answer is… API is not enabled.

So, I presume I need to approach my server host to get them to enable command blocks do I?
Wojbie #13
Posted 01 April 2015 - 03:09 PM
He needs to enable command-blocks API in computercraft config in addition to enabling commands blocks.
Corky_McDuff #14
Posted 01 April 2015 - 03:27 PM
Ok, I will log a ticket with them. Thank you all for your help!
Corky_McDuff #15
Posted 01 April 2015 - 04:16 PM
All fixed and working now….thank you all so much for your help!