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

[Help][Lua] Turtle can't turn on a Computer...

Started by Matrixmage, 25 September 2012 - 06:42 PM
Matrixmage #1
Posted 25 September 2012 - 08:42 PM
I have this code to make GPS towers, and I had asked someone for some help with getting a turtle to turn on a turtle, but now I have finished my code, and in testing, I found that i get a error every time it tries to turn on the computer.

Here's the offending code:

local c = peripheral.wrap("front")

c.turnOn() --turn on the comp

can someone help?
Cranium #2
Posted 25 September 2012 - 08:44 PM
Tha tlooks like it should work. What kind of error are you getting?
Matrixmage #3
Posted 25 September 2012 - 08:46 PM
Sorry, I forgot to include it :P/>/>

I get

:102: attempt to index ? (a nil value)
Cranium #4
Posted 25 September 2012 - 08:52 PM
It sounds like it is not detecting that there is a peripheral in front of it.
  1. Is the turtle directly next to the computer
  2. What version CC do you have? 1.42 might have a bug for this, but that's just a wild guess.
Matrixmage #5
Posted 25 September 2012 - 08:53 PM
I do have 1.42 and my wireless mining turtle is directly in front of the computer.
Mtdj2 #6
Posted 25 September 2012 - 09:03 PM
I don't know if turtles can turn on turtles…
I do know computers can, but, well…
Maybe it's because of the local keyword, I dunno…
I hope i helped your braincells accelerate…
Cranium #7
Posted 25 September 2012 - 09:04 PM
I dunno, unless I'm missing something, this might be a bug? I'm hesitant to say so though.
Matrixmage #8
Posted 25 September 2012 - 10:02 PM
I don't know if turtles can turn on turtles…
I do know computers can, but, well…
Maybe it's because of the local keyword, I dunno…
I hope i helped your braincells accelerate…

I don't really know what you mean… I'm trying to get my turtle to turn on a computer not a turtle… And I was thinking about posting this in the bugs section as a possible bug… If you guys can think of anything, let me know!
Cranium #9
Posted 25 September 2012 - 10:17 PM
No idea, man. By all rights, this should work.
Noodle #10
Posted 25 September 2012 - 10:18 PM
Is it facing the computer?
If it is then try placing computers all around it then executing the code.
Whichever one turns on is the front.