I read the tutorial by ThinkDigital and TDK on how to create a multiplayer game, so I decided to start, but even having done a code equivalent to the code of the tutorials, when I connect like a host and, after that, my friend connect like a client from home him, the program does not work(it say can not find the sessioID number). What am I doing wrong, any help me? Thanks. Sorry for my english
set window on
set window size 640,480
sessionID AS INTEGER
perform checklist for net connections
cls
print "CONNECTIONS (Podem ocorrer em qualquer ordem)"
for e=1 to checklist quantity()
print e;". ";checklist string$(e)
next e
print
ink rgb(0,255,0),0
print "Digit "c" if you want be a client"
input "or digit "h", if you want be the host: ", m$
if m$="c"
print
ink rgb(255,255,255),0
input "Digit the correspondent number TCP/IP of your conection : ",d
input "digit your IP to join itself to the host: ", ip
set net connection d,str$(ip)
perform checklist for net sessions
for i = 1 to checklist quantity()
if checklist string$(i) = "SpaceInvaders"
sessionID = i
exit
endif
next i
join net game sessionID, "Josue"
print "you have connected to the game Space Invaders"
print "number of session: ",sessionID
print "number of player(host): Josue"
else
if m$="h"
set net connection 3," "
create net game "SpaceInvaders","Josue",2,1
print
ink rgb(255,255,255),0
print "new net game created!"
endif
endif
do
loop