2 posts
Posted 07 January 2013 - 11:42 AM
Reproducible in all versions
When passing an integer into the message field of rednet.send(), "rednet:350: string expected" is printed.
Lua functions usually can take integers in place of strings.
8543 posts
Posted 07 January 2013 - 11:44 AM
tostring() your intended message.
2447 posts
Posted 07 January 2013 - 11:46 AM
Maybe Lua functions usually can - but this one can't. Just pass a string. Is it really that hard? :P/>
2 posts
Posted 07 January 2013 - 11:50 AM
Didn't see tostring() in the lua reference manuals… so thank you. I'm sending integer variable information so I couldn't send it without tostring()
392 posts
Location
Christchurch, New Zealand
Posted 07 January 2013 - 12:51 PM
I believe textutils.serialize will serialize just numbers too.
I use it always when sending stuff over rednet, it allows you to send entire tables, serialized in to strings. It's fantastic.
1619 posts
Posted 07 January 2013 - 02:48 PM
I believe textutils.serialize will serialize just numbers too.
I use it always when sending stuff over rednet, it allows you to send entire tables, serialized in to strings. It's fantastic.
Or just use tostring(), which is much shorter and less confusing to new users.