Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 help with net commands
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
bill_ion_boi




PostPosted: Sun Dec 12, 2004 10:59 pm   Post subject: 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....


Game3.zip
 Description:

Download
 Filename:  Game3.zip
 Filesize:  25.39 KB
 Downloaded:  94 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
pluckster




PostPosted: Mon Dec 13, 2004 7:41 am   Post subject: (No subject)

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




PostPosted: Mon Dec 13, 2004 4:34 pm   Post subject: (No subject)

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




PostPosted: Mon Dec 13, 2004 6:14 pm   Post subject: (No subject)

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


cli_0.2.4.t
 Description:

Download
 Filename:  cli_0.2.4.t
 Filesize:  1.62 KB
 Downloaded:  95 Time(s)


serv_0.2.6.t
 Description:

Download
 Filename:  serv_0.2.6.t
 Filesize:  3.66 KB
 Downloaded:  96 Time(s)

bill_ion_boi




PostPosted: Mon Dec 13, 2004 7:28 pm   Post subject: (No subject)

I Know what the problem is, i can connect to another computer but data is not transfered between the two computers via
code:
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



Game3.zip
 Description:

Download
 Filename:  Game3.zip
 Filesize:  25.58 KB
 Downloaded:  89 Time(s)

pluckster




PostPosted: Mon Dec 13, 2004 8:12 pm   Post subject: (No subject)

EUREKA!!!

Quote:
...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




PostPosted: Mon Dec 13, 2004 8:24 pm   Post subject: (No subject)

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




PostPosted: Mon Dec 13, 2004 9:23 pm   Post subject: (No subject)

It would be helpfull to see those procedures.

Just guessing, did you remember to specify to get from "netStream' rather than the local user?
Sponsor
Sponsor
Sponsor
sponsor
bill_ion_boi




PostPosted: Tue Dec 14, 2004 3:43 pm   Post subject: (No subject)

I did post the code
DanShadow




PostPosted: Tue Dec 14, 2004 5:50 pm   Post subject: (No subject)

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




PostPosted: Tue Dec 14, 2004 7:01 pm   Post subject: (No subject)

i have nothing there helped me..... Sad
pluckster




PostPosted: Wed Dec 15, 2004 1:55 pm   Post subject: (No subject)

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




PostPosted: Wed Dec 15, 2004 3:43 pm   Post subject: (No subject)

can someonle explain a little about the following two commands and when to use them?
put : netStream, varname
get : netStream, varname
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 13 Posts ]
Jump to:   


Style:  
Search: