This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
ShadowGamer's profile picture

floopy disk and turtles

Started by ShadowGamer, 08 May 2012 - 06:03 PM
ShadowGamer #1
Posted 08 May 2012 - 08:03 PM
Im wondering if there is some way that a program can be transfered from a turtle to a floppy disk and if a program can be transfered from a floppy disk to a turtle so the question im asking is it possable?
MysticT #2
Posted 08 May 2012 - 08:55 PM
That's what the disk drive is for. Turtles can access peripherals just like computers. You just have to place a disk drive on any side of the turtle and insert the floppy.
ShadowGamer #3
Posted 08 May 2012 - 10:06 PM
alright thanks thats helpful :)/>/>

also one more question is there a way to send commands wirelessly to turtles and PCs using rednet or something
Luanub #4
Posted 08 May 2012 - 10:28 PM
You can send keywords to initiate the commands for example


Computer
rednet.send(turtleId, "forward")

Turtle
id, msg = rednet.receive()
if msg == "forward" then
turtle.forward()
end

The message sent can be anything you choose you do not have to use forward to make it go forward.
Edited on 08 May 2012 - 08:29 PM
ShadowGamer #5
Posted 09 May 2012 - 12:12 AM
um another question
in this code

Computer
rednet.send(turtleId, "forward")

Turtle
id, msg = rednet.receive()
if msg == "forward" then
turtle.forward()
end

1.do i put end after the script?
2.do i put the script in a program format by using edit(program name)?
Luanub #6
Posted 09 May 2012 - 02:04 AM
ends are only needed for stuff like loops, functions, if statements etc, you do not need one to end the program.

You can either add it to a program from in game using "edit filename" from the prompt, or if you have access to the computers/servers file structure you can use notepad++, gedit or some other text editor.

Server Files are located at
serverfolderworldcomputercomputerid

Single Player files are in
.minecraftsavessavegamecomputercomputerid
ShadowGamer #7
Posted 09 May 2012 - 03:56 AM
thanks so much for your guys help i finnaly got it working and am vary happy :)/>/>