I'm using ti84+'s and a miniusb link cable. How can I use GetCalc( to determine if a variable was received on the other calc? I know that you can't have two
While X=0 //x is changed to Y on second calc. They both aren't receiving x.
GetCalc(X,1) //the 1 is to indicate link type, miniusb, not I/O//
End
on both calcs at the same time or it loops forever. How can I recieve two vars, one from each, at the same time? I want to experiment and try to make "What are the odds" game by you choosing a number and then you receive the opponents num at the same time.
I could be wrong, but I think for the link cables, data can only be sent one way at a time. Having both calcs send data at the same time, I'm not sure. Then again, I could be surprised and be wrong.
Yes it can't be receiving at the same time so how can I be sure they won't receive at the same time and also know that they did recieve (so when they enter in nums, it receives other and waits, then resumes when it knows the other got it's var). Is it possible or would it be a lot easier with an I/O cable and Send( and Get(?
zeldaking wrote:
I could be wrong, but I think for the link cables, data can only be sent one way at a time. Having both calcs send data at the same time, I'm not sure. Then again, I could be surprised and be wrong.
One of the most difficult things with GetCalc( is that you can only "pull" data from another calculator; you can't push it. Exchanges often include one calculator setting a variable to a value, waiting for the other calculator to change another variable in acknowledgement, and repeat. The other complication is that the "sending" calculator (the one not performing the GetCalc) must be at a Menu( or Pause for the fetch to succeed.

Edit: You can't use Send( and Get( with an I/O cable either; you still have to use GetCalc(. Send( and Get( are only for CBL/CBR devices.
I have an idea. Before you have the input nums, you set them to 0. So when you enter the num, it executes one GetCalc(. Then if it equals 0, it does

Code:
:Label 0
:GetCalc(X or Y,1) // X or Y not both there, just 1 would be there, for diff calcs//
:If X or Y=0:Then
:Disp("OPPONENT NOT READY")
:Pause
:Goto 0
:Else:Commands

So if one player checks, it won't freeze, right?
That seems like a reasonable way to do it to me, icebird. By the way, have you considered using the CALCnet routines in Doors CS 7.2? They let you do much more powerful networking and linking, including actively sending and receiving messages. You can find documentation here: http://dcs.cemetech.net/index.php?title=DCSB_Libs

Also, you should Introduce Yourself in our thread for that reason.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement