
-----------------------------------
bill_ion_boi
Sun Dec 12, 2004 10:59 pm

help with net commands
-----------------------------------
In my program i can connect to another computer but for some reason after the connection the actual game doesnt run like the graphics etc. and the two computers cant play together....

-----------------------------------
pluckster
Mon Dec 13, 2004 7:41 am


-----------------------------------
yea i think i have a similar problem... or a least i have a problem with net commands. Im working on an IM of sorts right now im working on the connect list of users. it works fine on the scholls network and on my computer but when i send it to my friends to try it out, they cant even connect. if anyone can help us out thatd be awesome.

-----------------------------------
SuperGenius
Mon Dec 13, 2004 4:34 pm


-----------------------------------
You may not be able to connect to a friend's computer offsite because the Net.LocalAddress command which you will probably be using returns.. the local address, which can and probably will be different from your machine's public address. On how to fix the problem though, I'm not too sure.

-----------------------------------
pluckster
Mon Dec 13, 2004 6:14 pm


-----------------------------------
Well i guess it would be helpful if you guys could see my programs so ill put em here. The first is the server program and the second is the client

-----------------------------------
bill_ion_boi
Mon Dec 13, 2004 7:28 pm


-----------------------------------
I Know what the problem is, i can connect to another computer but data is not transfered between the two computers via 
if Net.LineAvailable (netStream) then
I know this because in that if statment i put else "data transfer problem" and that is what i get.

They question still remains as to why....PLEASE HELP
 

If you are looking in my code there are two procdeures called start1 and start2 and they have the "get" commands in them. I call on these procedures after the  "if Net.LineAvailable (netStream) " after they make their choice. If choice 1 (server) is chosen then it runs start1 and for choice 2 (client) it runs start2

-----------------------------------
pluckster
Mon Dec 13, 2004 8:12 pm


-----------------------------------
EUREKA!!!

...put "Connected to ", netAddress
delay (10000)
cls

if Net.CharAvailable (netStream) then

    if choice = 1 then
        player (1).x := 10
        player (1).y := 10...

Where in either part of the program is there some sort of code to get the char needed by Net.CharAvailable. i sure can't find any.

-----------------------------------
bill_ion_boi
Mon Dec 13, 2004 8:24 pm


-----------------------------------
well in that bit of code u posted...after i assign height and width etc to the palyer variables i call on a procedure called start1 or start2 and it is those procedures that have "get" in them

-----------------------------------
SuperGenius
Mon Dec 13, 2004 9:23 pm


-----------------------------------
It would be helpfull to see those procedures.

Just guessing, did you remember to specify to get from "netStream' rather than the local user?

-----------------------------------
bill_ion_boi
Tue Dec 14, 2004 3:43 pm


-----------------------------------
I did post the code

-----------------------------------
DanShadow
Tue Dec 14, 2004 5:50 pm


-----------------------------------
Well...you guys could always just refer to the Turing .NET Tutorial  :wink: .

Turing .NET Tutorial
http://www.compsci.ca/v2/viewtopic.php?t=5795

-----------------------------------
bill_ion_boi
Tue Dec 14, 2004 7:01 pm


-----------------------------------
i have nothing there helped me..... :(

-----------------------------------
pluckster
Wed Dec 15, 2004 1:55 pm


-----------------------------------
thats what i used. it does work on the schools network but as soon as the program is over the net, it cant connect.

-----------------------------------
bill_ion_boi
Wed Dec 15, 2004 3:43 pm


-----------------------------------
can someonle explain a little about the following two commands and when to use them?
put : netStream, varname 
get : netStream, varname
