Re coding for turtles

  • 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

Calibra

New Member
Jul 29, 2019
38
0
0
Hi
I have setup my first turtle in computercraft.

I have a computer a turtle a disk drive and a printer....

Firstly do i need one computer formeach turtle, as i can only have one program called startup.....not sure if a program can address a particular turtle ?

Also is there a way of running code one line att a time whilst viewing what is being done bynthe program, would help in debugging etc...

Lastly would be great if there was a form of macro recorder as in excel, for turtle code. This would allow the code to be auto written by driving / controlling the turtle

Thanks
 

tompy97

New Member
Jul 29, 2019
85
0
0
you don't need computers at all to run turtles. Turtles are literally moving computers. You can make as many program's as you want, if you name it startup it will simply run when the turtle loads.

As for your second question, no, there is no way to run the code line by line. Though it does output the line that an error occurred on if there are any.

As for your last question, I'm not exactly sure what you are asking. What exactly do you want the turtle to do?
 

egor66

New Member
Jul 29, 2019
1,235
0
0
The easy answer is no as stated above, turtles run LUA code thats input to them, the easy way to learn or just use a program some one else has made & tweak to suit your needs is to go to the CC forums, to learn all things turtle/computercraft related http://www.computercraft.info/forums2/
 

Calibra

New Member
Jul 29, 2019
38
0
0
Hi
Thats a pity, because with most programming languages, there is a debug mode, which allows the program tombe run a line at a time......i dont know what language the turtles use, but following a line at a time would should what each piece of code does....

My last question was, in excel visual basic there is a macro recorder, where actions can be recorded in a macro which is automatically converted into code, this really made it easy to,learn visual basic.......

Thanks
 

tompy97

New Member
Jul 29, 2019
85
0
0
Turtles use the LUA coding language, which is quite basic. There is no macro recorder available that I am aware of, i'm not even sure it would be possible to implement that in minecraft anyway.
 

gattsuru

Well-Known Member
May 25, 2013
364
103
68
Hi
Thats a pity, because with most programming languages, there is a debug mode, which allows the program tombe run a line at a time......i dont know what language the turtles use, but following a line at a time would should what each piece of code does....
There are LUA Integrated Development Environments (IDEs), but they won't support Minecraft- or turtle-specific commands and don't tend to be that robust to start with. It's probably more useful to learn to write simple debugging messages using print().

My last question was, in excel visual basic there is a macro recorder, where actions can be recorded in a macro which is automatically converted into code, this really made it easy to,learn visual basic.......
There was an effort to try and build a macro recording functionality into SCitE, but I've not followed that project in a long time. LUA's not really built for that sort of design thought, and heavy lifting macro recorders have fallen out of favor in general.
 

casilleroatr

New Member
Jul 29, 2019
1,360
0
0
When you open a computer or turtle you can type LUA into the command line and test individual commands that way.