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

Function Arguments Expected when I gave them to it

Started by TechedZombie, 27 April 2015 - 09:02 PM
TechedZombie #1
Posted 27 April 2015 - 11:02 PM
ok so basically I have this function


function sapSlot()
  turtle.select(2)
  local data = turtle.getItemDetail(2)
  if data.name == minecraft:sapling and data.damage == 2 then
  
	print("test")
  
  end
end


And without even running the function I get an error saying Function arguments expected on line 14 (that is the line with the if statement BTW)
Dragon53535 #2
Posted 27 April 2015 - 11:08 PM

function sapSlot()
  turtle.select(2)
  local data = turtle.getItemDetail(2)
  if data.name == minecraft:sapling and data.damage == 2 then
  
	print("test")
  
  end
end
Your error is the minecraft:sapling. It should be "minecraft:sapling"
TechedZombie #3
Posted 27 April 2015 - 11:13 PM
Thanks!