Jump to content




Value turtle


  • You cannot reply to this topic
4 replies to this topic

#1 proxene

  • Members
  • 6 posts

Posted 20 April 2016 - 06: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

#2 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 20 April 2016 - 07: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.

#3 Dragon53535

  • Members
  • 973 posts
  • LocationIn the Matrix

Posted 20 April 2016 - 07: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 by Dragon53535, 20 April 2016 - 07:31 PM.


#4 proxene

  • Members
  • 6 posts

Posted 20 April 2016 - 08: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/4W1eywQi

Regards ,
Proxene

#5 The_Cat

  • Members
  • 119 posts

Posted 20 April 2016 - 09:31 PM

View Postproxene, on 20 April 2016 - 08:47 PM, said:

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/4W1eywQi

Regards ,
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.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users