Jump to content




Program - Program error


  • You cannot reply to this topic
1 reply to this topic

#1 True_Dictionary

  • New Members
  • 1 posts

Posted 24 February 2013 - 04:43 AM

Title: Program - Program error

My xp farm program for my ftb singleplayer is geting an error and i have look all over the forums with no luck, so i decided to ask a pro and see if i can get help.

*error* - bios:338: [string "mobspanwer"]:8: '(' expected

and here is the program, pretty basic.

function attack()
turtle.attack()
check()
sleep(.1)
end

function check
if turtle.getItemCount(16) > 0 then
for i = 1, 16 do
turtle.select(i)
turtle.dropDown
end

turtle.select(1)
end



i literally just started using turtles and writing scripts so please criticize so i can learn from my mistakes

#2 SuicidalSTDz

    Permutator of Strings

  • Members
  • 1,308 posts
  • LocationPennsylvania

Posted 24 February 2013 - 10:31 AM

You did not make the function correctly:

function attack()
turtle.attack()
check()
sleep(.1)
end
function check()
if turtle.getItemCount(16) > 0 then
for i = 1, 16 do
turtle.select(i)
turtle.dropDown
end
turtle.select(1)
end

function check should be function check() Functions must be enclosed with parenthesis to indicate the call.

The next error will be on line 10
You must close the line with parenthesis like so:
turtle.dropDown()






2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users