so im trying to send a couple of variables over rednet using textutils.serialize() and unserialize but its giving me an error every time it unserializes
"sender, message = rednet.receive()
mail = textutils.unserialize(message)
account = mail[1]
func = mail[2]
p1 = mail[3]
p2 = mail[4]
p3 = mail[5]"
any idea why?
textutils.serialize() and unserialize
Started by Kenzo, Dec 31 2014 06:29 AM
1 reply to this topic
#1
Posted 31 December 2014 - 06:29 AM
#2
Posted 31 December 2014 - 06:43 AM
What's the sending code look like? What does the error look like?
If it's throwing an attempt to index nil, then that would imply that whatever message is being received isn't a valid serialised table. You could try printing "message" to ensure it's what you think it should be.
If it's throwing an attempt to index nil, then that would imply that whatever message is being received isn't a valid serialised table. You could try printing "message" to ensure it's what you think it should be.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











