Posted 09 December 2012 - 01:54 PM
Hello there, most of the time fidling around for a few hours I can make things work for me. I just started learning programming and I have a litle problem that I can't seem to solve.
I'm trying to make a lift with turtles since there are no frames and redpower yet in Feed the Beast :(/>
It works but I recieve this error: rednet:350: string expected, this has probably to do with tArgs part… I think :)/>
The problematic code I use to send to my turtles
What my turtles use to recieve it (I want it to be two if statements if possible)
SOLVED
I'm trying to make a lift with turtles since there are no frames and redpower yet in Feed the Beast :(/>
It works but I recieve this error: rednet:350: string expected, this has probably to do with tArgs part… I think :)/>
The problematic code I use to send to my turtles
tArgs = {...}
up = (tArgs[1])
down = (tArgs[2])
rednet.open("top")
rednet.send(9, tArgs[1])
rednet.send(9, tArgs[2])
What my turtles use to recieve it (I want it to be two if statements if possible)
print("Lift program running, hold CTRL T to terminate")
rednet.open("left")
repeat
local id, msg = rednet.receive()
if msg == "up" then
for i=1, 5 do
turtle.up()
end
else
for x=1, 5 do
turtle.down()
end
end
until nil
SOLVED
tArgs = {...}
rednet.open("top")
rednet.send(9, tArgs[1])