Jump to content




Send Variable Over Rednet...


  • You cannot reply to this topic
2 replies to this topic

#1 hbomb79

  • Members
  • 352 posts
  • LocationOrewa, New Zealand

Posted 19 June 2014 - 06:39 AM

I keep trying but for some reason the computer im sending it to keeps giving me an error

Sending Computer Code
rednet = "Hi"
rednet.send(7,rednet,"Missile")

Receiving Computer Code
print "Message Details: "
	print ("SenderID: "..id.."")
	print ("Message: "..message.."")
	term.setTextColor(colors.purple)
	 print "====================================="
	end

Error Im Getting :
Attempt To Concatenate Table And String

Edited by Hbomb_79, 19 June 2014 - 06:40 AM.


#2 wieselkatze

  • Members
  • 221 posts
  • LocationGermany

Posted 19 June 2014 - 07:54 AM

The problem is, that you named your variable rednet. Rednet is the table of functions of the rednet API. Rename your variable you want to send.

Also in both computers you forget to open the modem with rednet.open(side)
On the receiving computer there is also a
id, message = rednet.receive()
needed to actually get the mesaage.

#3 hbomb79

  • Members
  • 352 posts
  • LocationOrewa, New Zealand

Posted 19 June 2014 - 08:26 AM

I have added rednet.open() The program is 1000 lines long and i only reproduced the code in theis post, thanks tho, although i figured that out right after i posted :/





3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users