Jump to content




taking items from a chest


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

#1 protexxi

  • Members
  • 51 posts

Posted 09 October 2012 - 01:03 PM

I wish to place a ender chest retrieve fuel and then refuel

i have a function to refuel
and i have
turtle.select(15)
turtle.placeUp()
turtle.select(14)
turtle.takeUp(5)
turtle.select(15)
turtle.digUp()
end

but it dosent work any ideas?

#2 Doyle3694

  • Members
  • 815 posts

Posted 09 October 2012 - 01:09 PM

turtle.suck()

#3 protexxi

  • Members
  • 51 posts

Posted 09 October 2012 - 01:10 PM

what?

#4 Doyle3694

  • Members
  • 815 posts

Posted 09 October 2012 - 01:10 PM

Also, this is on the wiki, please don't ask here without reading the wiki first.
http://computercraft...urtle_%28API%29

#5 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 09 October 2012 - 01:28 PM

Ender chests won't work for turtles. The contents of ender chests are stored in the player data. Turtles have no player data.

#6 protexxi

  • Members
  • 51 posts

Posted 09 October 2012 - 01:36 PM

they do work i have it working but my if statment has a error now

#7 protexxi

  • Members
  • 51 posts

Posted 09 October 2012 - 01:43 PM

looked on the wiki there is no is no help for a goto command e.g
if x <5 then
goto "refuel"
::refuel::
turtle.refuel()
goto "run"
::run::
code here
sends a error on the ::run::

#8 faubiguy

  • Members
  • 213 posts

Posted 09 October 2012 - 02:05 PM

There is no goto in lua 5.1, which ComputerCraft uses. Use this instead:
if x < 5 then
 turtle.refuel()
end
--code here


#9 protexxi

  • Members
  • 51 posts

Posted 09 October 2012 - 02:19 PM

i need the code to count so every time it runs it dose x-1 then when x is <5 it runs a a diffident program

#10 protexxi

  • Members
  • 51 posts

Posted 09 October 2012 - 02:21 PM

this would work
x = 64
if x <5 then
getfuel()
refuel()
tunnel()
end
else if x >5
getfuel()
refuel()
down()
empty()
end
end
but i need it to loop forever?

#11 jag

  • Members
  • 533 posts
  • LocationStockholm, Sweden

Posted 09 October 2012 - 02:59 PM

View PostOrwell, on 09 October 2012 - 01:28 PM, said:

Ender chests won't work for turtles. The contents of ender chests are stored in the player data. Turtles have no player data.
I think he means the ender storage mod, not the implemented ender chests.
And you can't even break the ender chests, unless you got a silk touch pickaxe (wich isn't available for turtles...)





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users