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

Noob Error

Started by BossVitorious, 03 September 2014 - 08:24 PM
BossVitorious #1
Posted 03 September 2014 - 10:24 PM
I'm doing a simple program (my first one) but i get a '<name>' expected error (prety sure its a noob mistake).
The code is supposed to place a block if the lever is on and break it if its off

Here is the code:


if redstone.getInput("top") == true then
  turtle.place()
  sleep(5)
else
  turtle.break()
  sleep(5)
end
Cranium #2
Posted 03 September 2014 - 10:40 PM
I think you mean turtle.dig(), not turtle.break().
BossVitorious #3
Posted 04 September 2014 - 09:15 AM
*facepalm* i knew it was a noob mistake.
Thank you and sry for the trouble.
TheOddByte #4
Posted 04 September 2014 - 02:01 PM
Cranium has the answer above, also make sure that you've checked the wiki about turtles. There's alot of good info there
Turtle API
Edited on 05 September 2014 - 01:27 PM
KingofGamesYami #5
Posted 04 September 2014 - 02:09 PM
Fixed link to turtle api: turtle api

The forum leaves off the ) in the link.
TheOddByte #6
Posted 05 September 2014 - 03:27 PM
Fixed link to turtle api: turtle api

The forum leaves off the ) in the link.
Damn, didn't notice that, thanks :D/>