Jump to content




My first program has an error i don't know how to fix


  • You cannot reply to this topic
4 replies to this topic

#1 TehBinky

  • New Members
  • 2 posts

Posted 03 December 2013 - 07:27 PM

Hello anyone and everyone reading this I am a newbie with ComputerCraft and I am just getting started i wanted to write a program to run continuously cutting down a tree to make charcoal rather than using someone else's program I thought the best way to learn would be to try it myself although I'm having some troubles getting the program to function here is the code http://pastebin.com/KXiXJptg any help would be greatly appreciated.

The error I am getting is bios:339: [string "charcoal"]:94: 'end' expected (to close 'function' at line 68)

Edited by Bubba, 03 December 2013 - 08:29 PM.
Ridiculously small font size


#2 Okyloky9

  • Members
  • 57 posts

Posted 03 December 2013 - 07:48 PM

The function is just "sleep(time)" so in your case, sleep(180). Also, your function getBone is missing an end. One for the function and one for the if statement

Edited by Okyloky9, 03 December 2013 - 07:49 PM.


#3 Robotonic

  • Members
  • 19 posts
  • LocationEast Midlands, U.K.

Posted 03 December 2013 - 07:58 PM

Also, end the function and the if.

#4 TehBinky

  • New Members
  • 2 posts

Posted 03 December 2013 - 08:23 PM

Thank you so much for the help i changed what you said was wrong and now im getting :82 attempt to call nil here is an updated version of the code http://pastebin.com/uF0sERq4

#5 awsmazinggenius

  • Members
  • 930 posts
  • LocationCanada

Posted 03 December 2013 - 08:33 PM

You call just getSap(), not turtle.getSap(). Same for the other functions. Have you read the "Read this before Asking Questions" sticky?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users