Help with the mining turtle.

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Deetrox

New Member
Jul 29, 2019
7
0
0
I play on my friends server and im new to mining turtles.
I have this strip mining code for the mining turtle but idk how to get it into the turtle.
Here is the code.

When i try to copy paste that onto the screen after typing "edit stripmine" it only paste the first line. "local tArgs ={...}"
Ive also read somewhere that after you type "edit stripmine" and save it, you can go to Save > New World > computer > 0, And copy paste what was in the pastebin into there and save it. When i try that i get this

OnnVG.png

So what am i doing wrong? How do i run this damn script. How can i run it on my friend server?
 

Vauthil

New Member
Jul 29, 2019
1,491
-14
1
Does your friend's server have HTTP API enabled? I don't think it is by default, unfortunately.

If it is, you could easily get this by running "pastebin get vYf6MVbc stripmine".

Otherwise... tag, somebody else is it to answer this! =)
 

Deetrox

New Member
Jul 29, 2019
7
0
0
Does "pastebin get vYf6MVbc stripmine" not work in single player? I tried and it said "No Such Program". Ill try on his server now.

EDIT: Just tried it on my friend server and its telling me the same thing? No such program.
 

Micmager

New Member
Jul 29, 2019
108
0
0
I've always just typed out the code by hand. Takes a while but it gives me the chance to proofread coding.
 

Vauthil

New Member
Jul 29, 2019
1,491
-14
1
Does "pastebin get vYf6MVbc stripmine" not work in single player? I tried and it said "No Such Program". Ill try on his server now.

EDIT: Just tried it on my friend server and its telling me the same thing? No such program.
Means you and your friend probably don't have the HTTP API enabled in the ComputerCraft config. That's fine; it can get hairy if you have that open. But it does mean that manual typing is your best bet.
 

ScottWears

New Member
Jul 29, 2019
233
0
0
If that doesn't work I have use Paste tool before on Rp computers not sure if it works on turtles but its worth a try :) it basically types the contents of your clipboard into the computer in minecraft, come back and let us know if you try it.
 

NeoNova

New Member
Jul 29, 2019
7
0
0
Also, your program has a bug in the second line. If you don't supply `stripmine` an argument like `stripmine 37`, tArgs[1] will be nil and you cannot directly concatenate nil to a string. You can fix this easily by either assigning a default value or by asking for input if no argument is given (also, you can leave it as is and just supply arguments all the time). Some like this would likely work:

Code:
local tArgs = {...}
local spaces = tArgs[1]
if not spaces then
    spaces = 5
end
print("Mining: "..spaces.." spaces")
I'm sure Lua has a shorthand for this (something like `spaces = tArgs[1] || 5` or something, but I'm not well versed in lua.

I hope this helps.

Edit:
You'll also have to change the `tArgs[1]` all the way in the bottom to `spaces` if you want to copy the code directly.
 

Deetrox

New Member
Jul 29, 2019
7
0
0
If that doesn't work I have use Paste tool before on Rp computers not sure if it works on turtles but its worth a try :) it basically types the contents of your clipboard into the computer in minecraft, come back and let us know if you try it.
When i try using that program i get this error.
EDIT: They should add a Spoiler BB code. I would put these pics in a spoiler so it doesn't do this to a thread.

It pops up right befor trying to type the character "{". The full line is "local tArgs ={...}".
So that almost worked if it wasnt for that error. Do i have a bad .NET framework?
EDIT: No clue how to make that text not green. Forum thinks its still code.[DOUBLEPOST=1353106542][/DOUBLEPOST]
Also, your program has a bug in the second line. If you don't supply `stripmine` an argument like `stripmine 37`, tArgs[1] will be nil and you cannot directly concatenate nil to a string. You can fix this easily by either assigning a default value or by asking for input if no argument is given (also, you can leave it as is and just supply arguments all the time). Some like this would likely work:

Code:
local tArgs = {...}
local spaces = tArgs[1]
if not spaces then
    spaces = 5
end
print("Mining: "..spaces.." spaces")
I'm sure Lua has a shorthand for this (something like `spaces = tArgs[1] || 5` or something, but I'm not well versed in lua.

I hope this helps.

Edit:
You'll also have to change the `tArgs[1]` all the way in the bottom to `spaces` if you want to copy the code directly.
Thanks for this but i know nothing about coding this stuff or how to apply the fix you posted but if anyone else found the code i linked useful they can fix it. I'm sure you helped someone ^_^