4 posts
Posted 03 November 2013 - 01:57 AM
lets say that
m = 15
but i need it to be
m = "15"
how can i do that?
i cant just change the 15 because its a variable thanks!
8543 posts
Posted 03 November 2013 - 02:13 AM
Split into new topic.
Are you looking for tostring()?
4 posts
Posted 03 November 2013 - 09:03 AM
Let me try this again
Here's the code
Peripheral.wrap("back")
Rednet.open("back")
M = turtle.getFuelLevel()
Rednet.send(6,M)
Print(M)
Ok so it sends perfect but it sends as
4567
Instead of
"4567"
How can I fix this?
91 posts
Posted 03 November 2013 - 09:15 AM
tostring() will convert things to a string.
ex:
x = 15
print(tostring(x))
4 posts
Posted 03 November 2013 - 09:53 AM
Ok so then how do I send the tostring via Rednet?
758 posts
Location
Budapest, Hungary
Posted 03 November 2013 - 09:56 AM
Man,
read the PIL.
rednet.send(6, tostring(M))
4 posts
Posted 03 November 2013 - 10:52 AM
Thanks I've been using lua for awhile but still not an expert at it! :)/>