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

bios:366: [string "turtleon2"] :2: ')' expected

Started by Dennir, 19 December 2014 - 05:29 PM
Dennir #1
Posted 19 December 2014 - 06:29 PM
I was trying to create a program for my pocket computer that would allow me to activate a mining turtle over rednet.
The pocket computer is supposed to send a signal to the turtle and then the turtle is supposed to send a signal to the pocket computer.
But so far i'm having problems with this error. can anyone tell me what i am doing wrong?

Here is the code for the pocket computer.


rednet.open("back")
rednet.send(19 "turtlestart")
print("waiting for turtle response")
id,message = rednet.receive()
if id == 19 and message == "ping" then
print("The turtle has started.")
end
rednet.close("back")

Sorry if my english is bad, it is not my primary language.
hbomb79 #2
Posted 19 December 2014 - 10:47 PM

rednet.send(19, "turtlestart")
You are missing a ',' on line two inbetween 19 and 'turtlestart'
Edited on 19 December 2014 - 09:47 PM
Dennir #3
Posted 21 December 2014 - 12:50 PM
Thanks.
It works now. sorry for wasting your time. I should have been more thorough when i searched for the error.