using a null modem cable i want to send
4 variables
need help on all aspects
recall network game
Variables being sent and recieved in order:
Replace (com port address) with the com port address (can't remember it)
Replace <null> with the null string (no value being sent) (can't remember this one either)
Code: Select all
'Host Computer--------
OUT (com port address), var1
OUT (com port address), var2
OUT (com port address), var3
OUT (com port address), var4
'End Host Computer-------------
'Recieving Computer----------
While VarsRecieved <> 4
While IN(com port address) = <null>
WEND
SELECT CASE VarsRecieved
Case 0
Var1 = Temp
Case 1
Var2 = Temp
Case 2
Var3 = Temp
Case 3
Var4 = Temp
End Select
VarsRecieved = VarsRecieved + 1
WEND
Replace <null> with the null string (no value being sent) (can't remember this one either)
THANKS A SHIT LOAD
U GUYS ARE GREAT !!!!
I WILL REMEMBER U WHEN I DO THE CREDITS !!!!!!!!!!!!!!!!!!!
I WILL REMEMBER U WHEN I DO THE CREDITS !!!!!!!!!!!!!!!!!!!
1. Replace all of (com port address) with &H400moneo wrote:A few suggestions:
&H400 2 bytes, COM1 port number
&H402 2 bytes, COM2 port number
&H404 2 bytes, COM3 port number
&H406 2 bytes, COM4 port number
I'm guessing, but <null> might be "" or chr$(0)
Shouldn't
While IN(com port address) = <null>
be
While INP(com port address) = <null>
*****
2. <null> must be an numeric value, (INP is a function that returns a numeric value.) and can not be a string. I believe a COM port gives off a value of either 0 or 63 when it is not recieving anything.
3. Yes, all IN(com port address) should be replaced with INP(com port address)
Also, if you want to send text over a COM port, you can send ASCII values, then have the recieving computer interpret it.