Jump to content




Got a rednet problem.

wireless

21 replies to this topic

#21 IndustrialLemon

  • Members
  • 61 posts

Posted 24 April 2015 - 06:52 PM

Okay well now the reciever is the only problem. Here's the error "syntax error"

tx = 0
ty = 0
tz = 0
player = {px = 0, py = 0, pz = 0}
pid = 0
rednet.open("right")
tx, ty, tz = gps.locate()
print(tx.." "..ty.." "..tz)
--while true do
pid, player{}, blah = rednet.receive()
print(player["px"])
print(player["py"])
print(player["pz"])


#22 Dragon53535

  • Members
  • 973 posts
  • LocationIn the Matrix

Posted 24 April 2015 - 07:04 PM

You can't do this line:
pid, player{}, blah = rednet.receive()
That player{} is your problem. If it's a table outright being sent, then it will be a table already.


Edit: So do this:
pid, player, blah = rednet.receive()

Edited by Dragon53535, 24 April 2015 - 07:09 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users