Spoiler
Textutils:166: Cannot Serialize Type Function
Started by campicus, Jul 31 2013 07:29 AM
10 replies to this topic
#1
Posted 31 July 2013 - 07:29 AM
I am trying to make my turtle send its coordinates via rednet but I get the above error. Any ideas?
#2
Posted 31 July 2013 - 07:35 AM
t[6] = tStatusis the problem. Should be
t[6] = status(tStatus is a function)
#3
Posted 31 July 2013 - 07:38 AM
Ah man, I had tStatus as both a var and function, which I thought I had fixed all instances but apparently not. You're actually a legend, thanks mate!
#4
Posted 31 July 2013 - 08:01 AM
-snip, nvm-
#5
Posted 31 July 2013 - 08:11 AM
Ok, more issues, now on the receiving side. I'm not really sure what I am doing, don't hate the noob!
I have:
I have:
rednet.open("right")
while true do
local id, message = rednet.receive()
local t = textutils.unserialize(message)
print("Pos: "..t[1]..","..t[2]..","..t[3])
end
#7
Posted 31 July 2013 - 08:17 AM
Yes sorry
#8
Posted 31 July 2013 - 08:22 AM
Version of ComputerCraft?
EDIT: Nevermind, the problem is in the sender: you serialize the table and put it into "message", then you send "msg", not "message".
EDIT: Nevermind, the problem is in the sender: you serialize the table and put it into "message", then you send "msg", not "message".
#9
Posted 31 July 2013 - 08:26 AM
Thanks again! I will get there eventually I swear (haha)
#11
Posted 01 August 2013 - 04:46 AM
Every mistake I make is one that I am less likely to repeat
That's what I keep telling myself... lol
3 user(s) are reading this topic
0 members, 3 guests, 0 anonymous users












