- ComputerCraft | Programmable Computers for Minecraft
- → protexxi's Content
protexxi's Content
There have been 9 items by protexxi (Search limited from 10-February 22)
#155863 Ripping my hair out with the last error
Posted by
protexxi
on 10 December 2013 - 06:07 PM
in
Ask a Pro
error is on line 43
line 43
while true do turtle.getFuelLevel(l) if ..l >=200 then refuel() rednet.send(1, "Refuelling... ") else rednet.send(1, "mining... ") mine() Empty() end end
line 43
if ..l >=200 theniv tried everything i can think of and google drew a blank
#155858 Program runs and ends without doing functions
Posted by
protexxi
on 10 December 2013 - 05:46 PM
in
Ask a Pro
Iv corrected the caps yet still fails
the end from the last function is missing and the whole function is missing
should fix it?
function mine()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.digDown()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.digDown()
turtle.turnRight()
turtle.turnRight()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.digDown()
turtle.turnLeft()
turtle.turnLeft()
turtle.turnRight()
turtle.forward()
turtle.turnRight()
turtle.turnRight()
times = times + 1
rednet.send(1, "Tunnel is: " ..times" Blocks long")
end
function Empty()
for i=2,9 do
turtle.select(i)
turtle.dropDown()
end
end
function refuel()
print ("Please Put Ender Chest In slot 1")
rednet.open(Right)
while true do
turtle.getFuelLevel(level)
if level >200 then
refuel()
rednet.send(1, "Refuelling... ")
else
rednet.send(1, "mining... ")
mine()
Empty()
end
end
end
the end from the last function is missing and the whole function is missing
function refuel()
shell.run(refuel(2))
print ("Please Put Ender Chest In slot 1")
rednet.open(Right)
while true do
turtle.getFuelLevel(level)
if level >200 then
refuel()
rednet.send(1, "Refuelling... ")
else
rednet.send(1, "mining... ")
mine()
Empty()
end
end
end
should fix it?
#155854 Program runs and ends without doing functions
Posted by
protexxi
on 10 December 2013 - 05:33 PM
in
Ask a Pro
heres the code
dose not return any errors just runs then ends without moving
function mine()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.digDown()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.digDown()
turtle.turnRight()
turtle.turnRight()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.digDown()
turtle.turnLeft()
turtle.turnLeft()
turtle.turnRight()
turtle.forward()
turtle.turnRight()
turtle.turnRight()
times = times + 1
rednet.send(1, "Tunnel is: " ..times" Blocks long")
end
function Empty()
for i=2,9 do
turtle.select(i)
turtle.dropDown()
end
end
function refuel()
print ("Please Put Ender Chest In slot 1")
rednet.open(Right)
while true do
turtle.getfuellevel(level)
if level >200 then
refuel()
rednet.send(1, "Refuelling... ")
else
rednet.send(1, "mining... ")
mine()
Empty()
end
end
end
dose not return any errors just runs then ends without moving
#155844 rednet and strings
Posted by
protexxi
on 10 December 2013 - 04:53 PM
in
Ask a Pro
When useing rednet i have used
thanks again
rednet.receive()a message will be sent from a turtle using
rednet.send(1, Hello world)Is there a way to print a string into the message e.g
turtle.dig() blocksdug = blocksdug + 1 rednet.send(1, Block Dug:[blocksdug])
thanks again
#155840 shrinking code?
Posted by
protexxi
on 10 December 2013 - 04:37 PM
in
Ask a Pro
Ok so making a program use in this function to place items into a ender chest
I remember there was a way to do this in one line something like .drop(2,9)?
turtle.select(1) turtle.placeDown() turtle.select(2) turtle.dropDown() turtle.select(3) turtle.dropDown() turtle.select(4) turtle.dropDown() turtle.select(5) turtle.dropDown() turtle.select(6) turtle.dropDown() turtle.select(7) turtle.dropDown() turtle.select(8) turtle.dropDown() turtle.select(9) turtle.dropDown() turtle.select(1) turtle.digDown
I remember there was a way to do this in one line something like .drop(2,9)?
- ComputerCraft | Programmable Computers for Minecraft
- → protexxi's Content


