Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • 0
wbrown2wmb

Need help with crafting upgrade

Question

What i'm attempting to do i use the robot to craft fireworks. I want it to take items from a chest, craft the stars then craft the rocket and put it in a different chest.  I have no clue as where to start. I program in VB mostly so lua is a new beast for me.

 

Any help with sample code would be appreciated as my searches didn't return much on using the crafting upgrade. Also is it possible to write the code on a computer and send it wirelessly to the robot?

 

I crafted  robot and computer with wireless cards but still need to make them communicate.

 

Thanks.

Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Please check out the wiki before posting here.

WIKI

 

I had a look and this is what i found.

 

General stuff:

http://ocdoc.cil.li/component

 

http://ocdoc.cil.li/api

 

How to controll the robot

http://ocdoc.cil.li/api:robot

 

How to arrange items in an inventory

http://ocdoc.cil.li/component:inventory_controller

 

You should also look for some lua tutorials if you are not familiar with it.

Link to post
Share on other sites
  • 0

I already have done all that. I have all the API code save in a word document. I read the wiki and it gives all the BASIC commands. I can make the robot go up, down and sideways.

 

I build databases and web apps for a living. I'm just not familiar with the lua language and was asking for guidance. Nowhere have I seen any code on how to make the robot actually craft anything other than in the crafting API.

Link to post
Share on other sites
  • 0

Thank you.

 

Built my robot and was testing the commands and I've run into a problem. My robot will not recognize robot.turnleft() or other commands except forward, back, up and down. I get this error:

 

stdin:1: attempt to call field 'turnleft' (a nil value)
stack traceback
kernel:137: in function turnleft
stdin:1: in main chunk
[c]: in function 'xpcall' /bin/lua.lua:62 in min chunk (..tail calls..)
 
I have no clue as to what is causing the error.
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.