Page 1 of 1
recall network game
Posted: Thu Dec 08, 2005 3:58 pm
by mechman
using a null modem cable i want to send
4 variables
need help on all aspects
Posted: Thu Dec 08, 2005 5:31 pm
by PQBC...
Variables being sent and recieved in order:
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 (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)
Posted: Thu Dec 08, 2005 6:50 pm
by moneo
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>
*****
THANKS A SHIT LOAD
Posted: Fri Dec 09, 2005 6:14 am
by MECHMAN
U GUYS ARE GREAT !!!!
I WILL REMEMBER U WHEN I DO THE CREDITS !!!!!!!!!!!!!!!!!!!
Posted: Fri Dec 09, 2005 12:35 pm
by PQBC says 'Howdy!'
moneo 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>
*****
1. Replace all of (com port address) with &H400
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.