Posted 11 January 2013 - 01:44 PM
I poked around on the wiki and read a bunch of threads here in this api section and have yet to figure this out. I'm trying to figure out how to put some global api's onto turtles.
For example I want a dig api. For now it has 2 functions. Dig.beeline(length) and dig.branch(length). one digs a 1x1 line the other is a 3x1 branch. Very simple for now.
Then i save it to apis/turtle because its a digging program. However when I open the lua interpreter and try to call it as Dig.branch(5) i get the error "attempted to index ? ( a nil value )". How would I make the api automatically loaded and available?
Thanks,
Taco
*edit*
I figured it out please delete.
For example I want a dig api. For now it has 2 functions. Dig.beeline(length) and dig.branch(length). one digs a 1x1 line the other is a 3x1 branch. Very simple for now.
Then i save it to apis/turtle because its a digging program. However when I open the lua interpreter and try to call it as Dig.branch(5) i get the error "attempted to index ? ( a nil value )". How would I make the api automatically loaded and available?
Thanks,
Taco
*edit*
I figured it out please delete.
Edited on 11 January 2013 - 12:46 PM