116 posts
Location
At my Computer coding for the Computer in my Computer
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?
3790 posts
Location
Lincoln, Nebraska
Posted 25 September 2012 - 08:44 PM
Tha tlooks like it should work. What kind of error are you getting?
116 posts
Location
At my Computer coding for the Computer in my Computer
Posted 25 September 2012 - 08:46 PM
Sorry, I forgot to include it :P/>/>
I get
:102: attempt to index ? (a nil value)
3790 posts
Location
Lincoln, Nebraska
Posted 25 September 2012 - 08: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.
116 posts
Location
At my Computer coding for the Computer in my Computer
Posted 25 September 2012 - 08:53 PM
I do have 1.42 and my wireless mining turtle is directly in front of the computer.
62 posts
Location
Behind you
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…
3790 posts
Location
Lincoln, Nebraska
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.
116 posts
Location
At my Computer coding for the Computer in my Computer
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!
3790 posts
Location
Lincoln, Nebraska
Posted 25 September 2012 - 10:17 PM
No idea, man. By all rights, this should work.
864 posts
Location
Sometime.
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.