I created two separate programs, one for the server and one for the client. They can both connect to the internet with a specified IP address, but I cannot get the client program to recognize the net session created by the server. I am really frustrated because I can't find any errors in my code. I have searched the forum for tutorials but can't find any relevant material.
Server Code:
perform checklist for net connections
for a=1 to checklist quantity()
print a,". ",checklist string$(a)
next x
input "WHAT NUMBER IS INTERNET TCP/IP CONNECTION (ABOVE):",con_type
set net connection con_type,""
create net game "Dark Chat","Server",10,2
if net game exists()=1
print "Server connected..."
endif
do
get net message
if net message exists()=1
MsgFrom$=str$(net message player from())
MsgTo$=str$(net message player to())
print "From Player:",MsgFrom$," To Player:",MsgTo$
print net message string$()
print "------------------------------"
send net message string net message player to(),MsgFrom$
send net message string net message player to(),net message string$()
endif
loop
Client Code:
perform checklist for net connections
for a=1 to checklist quantity()
print a,". ",checklist string$(a)
next x
input "WHAT NUMBER IS INTERNET TCP/IP CONNECTION (ABOVE):",con_type
set net connection con_type,""
perform checklist for net sessions
for b=1 to checklist quantity()
print b,". ",checklist string$(b)
next b
input "WHAT NUMBER IS DARK CHAT:",session_num
input "Enter a screen name:",screen_name$
join net game session_num,screen_name$
print "Welcome ",screen_name$,"!"
print "Press T to type a message"
do
get net message
if net message exists()=1
print net message string$()
endif
if inkey$()="t"
input "Send To(Player number):",send
input "Message:",message$
send net message string send,message$
endif
loop
Any help would be greatly appreciated.
Thank you
J.J. Redick-Player of the year
2006 National Champions