http://pastebin.com/qKS5CFu4
Script gives an error on line 39 that is:
rednet.send(ID, PIN, true)
Error:
rednet:39: Expect number
But the ID is a number that is entered before the rednet command runs.
So how can I fix this?
Thanks,
Android
rednet.send(ID, PIN, true)
Error:
rednet:39: Expect number
"2"
2 --// is a number
ID = 2
"2"
is not a number in Lua. It's a string - text.2 --// is a number
So, your code should be:ID = 2
"2"
is not a number in Lua. It's a string - text.2 --// is a number
So, your code should be:ID = 2
I will try that. Thanks already :)/>
ID=read()
This returns a string which is why it wouldn't work to convert this to a number do
ID = tonumber(ID)
--# or do this
ID = tonumber(read())
This returns a string which is why it wouldn't work to convert this to a number doID=read()
ID = tonumber(ID) --# or do this ID = tonumber(read())
This returns a string which is why it wouldn't work to convert this to a number doID=read()
ID = tonumber(ID) --# or do this ID = tonumber(read())
Ok I will try that. Gimme a sec.