6 posts
Posted 20 April 2016 - 07:08 PM
Hello ,
I have a problem with my code, I can not send my data to another computer which I use server.
rednet.send(ser,turtle.getItemCount(1,16))
Can you help me ?
Regards ,
Proxene
3057 posts
Location
United States of America
Posted 20 April 2016 - 08:29 PM
That code should successfully send the item count of slot 1 over rednet, given that 'ser' is a variable equivalent to the id of the computer you have a so called "server" on.
If ser is not defined anywhere, or is not the id of the computer running your "server" program, it won't work.
In addition, you may remove the 16. turtle.getItemCount only accepts 1 argument.
1080 posts
Location
In the Matrix
Posted 20 April 2016 - 08:31 PM
Question then, does the turtle have a wireless modem attached? Does the receiving computer also have one? Have you used rednet.open() on both the computer and turtle? Are you making sure that the receiving computer is able to receive more than one message?
Edited on 20 April 2016 - 06:31 PM
6 posts
Posted 20 April 2016 - 09:47 PM
Hello, I use a turtle in wireless with a modem and a computer equip him as a modem, it is communicating properly with each other but apparently when I send the total of the items contained in the inventory of turtle that does not work
Here is the complete code :
http://pastebin.com/4W1eywQiRegards ,
Proxene
121 posts
Posted 20 April 2016 - 10:31 PM
Hello, I use a turtle in wireless with a modem and a computer equip him as a modem, it is communicating properly with each other but apparently when I send the total of the items contained in the inventory of turtle that does not work
Here is the complete code :
http://pastebin.com/4W1eywQiRegards ,
Proxene
Are both computers chuck loaded?
So you are sending 4 rednet.send() commands, is the 'server' listening for these 4 separate items? (maybe you could try delaying the time until you send the next packet of data.)
(or you could send a table meaning you only need to use rednet.send() once.