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

{SOLVED} turtle.inspectDown() gives error farm:28: attempt to call nil

Started by coal760, 29 June 2015 - 06:41 PM
coal760 #1
Posted 29 June 2015 - 08:41 PM
I am using the computercraft mod in the Feed the Beast modpack, TechWorld2.
Every time I try to run my code in the file farm, I get error farm:28: attempt to call nil.

if turtle.detectDown() then
  local suc, t = turtle.inspectDown()
  if suc and t.name == "minecraft:wheat" and t.metadata == 7 then
	turtle.digDown()
	...
  end
end

Line 28 is the line


local suc, t = turtle.inspectDown()

Am I doing something completely wrong here? I've stared at this for about an hour and can't see the problem.
Edited on 29 June 2015 - 09:25 PM
Lyqyd #2
Posted 29 June 2015 - 10:12 PM
What version of ComputerCraft are you using?
coal760 #3
Posted 29 June 2015 - 10:21 PM
Computercraft version 1.58 is what is on the modpack for techworld 2 in feed the beast
Cranium #4
Posted 29 June 2015 - 11:11 PM
Well that would explain it. Turtles did not have that function in that version.
coal760 #5
Posted 29 June 2015 - 11:23 PM
Well, now I feel dumb. Thank you very much, I will try to update my mod pack asap!