Jump to content




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


  • You cannot reply to this topic
9 replies to this topic

#1 Matrixmage

  • Members
  • 116 posts
  • LocationAt my Computer coding for the Computer in my Computer

Posted 25 September 2012 - 07: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?

#2 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 25 September 2012 - 07:44 PM

Tha tlooks like it should work. What kind of error are you getting?

#3 Matrixmage

  • Members
  • 116 posts
  • LocationAt my Computer coding for the Computer in my Computer

Posted 25 September 2012 - 07:46 PM

Sorry, I forgot to include it :P/>

I get

:102: attempt to index ? (a nil value)

#4 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 25 September 2012 - 07:52 PM

It sounds like it is not detecting that there is a peripheral in front of it.
  • Is the turtle directly next to the computer
  • What version CC do you have? 1.42 might have a bug for this, but that's just a wild guess.


#5 Matrixmage

  • Members
  • 116 posts
  • LocationAt my Computer coding for the Computer in my Computer

Posted 25 September 2012 - 07:53 PM

I do have 1.42 and my wireless mining turtle is directly in front of the computer.

#6 Mtdj2

  • Members
  • 66 posts
  • LocationBehind you

Posted 25 September 2012 - 08: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...

#7 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 25 September 2012 - 08:04 PM

I dunno, unless I'm missing something, this might be a bug? I'm hesitant to say so though.

#8 Matrixmage

  • Members
  • 116 posts
  • LocationAt my Computer coding for the Computer in my Computer

Posted 25 September 2012 - 09:02 PM

View PostMtdj2, on 25 September 2012 - 08:03 PM, said:

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!

#9 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 25 September 2012 - 09:17 PM

No idea, man. By all rights, this should work.

#10 Noodle

  • Members
  • 989 posts
  • LocationSometime.

Posted 25 September 2012 - 09: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.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users