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

[SOLVED]Function:4d0152bb

Started by Rangicus, 13 September 2012 - 08:55 PM
Rangicus #1
Posted 13 September 2012 - 10:55 PM
Hello all,
I am making a cobble generator and I get this error:
Spoiler
Function:4d0152bb
Here is my entire API:
Spoiler
function getTree()
while turtle.detect() do
turtle.dig()
print("Digging the block")
turtle.digUp()
print("Digging the block")
turtle.up()
print("Moving up")
end
while not turtle.detect() and not turtle.detectDown() do
turtle.down()
print("Moving down")
end
print("Job done!")
end
function cobbleGen()
while true do
if turtle.detect() then
  turtle.dig()
end
itemcount = turtle.getItemCount(9)
if itemcount == 64 then
  for i=1,9 do
   turtle.select(i)
   turtle.drop()
  end
  turtle.select(1)
end
end
end 
The focus is the cobbleGen function.
Here are some screenshots also.
icehaunter #2
Posted 13 September 2012 - 10:58 PM
Basic error. Lua tells you, that you are calling a function and forgetting to put brackets "()"
Luanub #3
Posted 13 September 2012 - 10:59 PM
I don't think that is an error. Try calling it from a program from the normal shell and not the lua prompt.
icehaunter #4
Posted 13 September 2012 - 11:01 PM
luanub, try entering "exit" without brackets into lua prompt. Same deal.
Lettuce #5
Posted 13 September 2012 - 11:02 PM
You're doing it with the interactive lua prompt? I don't think that works, but I'm probably wrong. If you are a novice, it's probably easier (even if you do know what you're doing for that matter) to make a program.
Lyqyd #6
Posted 14 September 2012 - 12:59 AM
No, the first poster had it correct. If the parentheses are added to the end of the line, the lua prompt will then attempt to actually call the function.