
-----------------------------------
G-lant
Thu May 13, 2004 1:43 pm

Can you see whats wrong?
-----------------------------------
%vars
var stream : int := 0 % Used for sending data 
var msgBack : string % The message that gets sent back and forth 
var address : string % IP address for each computer 
var message : string 
var name : string
var yes : boolean := true
var no : boolean := false
var answer:string
var status : int 
%name status


%**********************************CHAT PROGRAM**********************************
put "What would you like your nickname to be?"
get name:*

%put "So you would like your nickname to be ", name
%get answer
% if yes then
%put "Ok good we dont have to make any changes ^^"
% elsif no  then
%put "Ok then lets try it again..."
cls
%end if
%end if
%end loop

%chat
const PORT := 5555 % Port to connect through 

put "What would you like to do?" 
put "1:Host" 
put "2:Join" 

get status

if status = 1 then 
    stream := Net.WaitForConnection (PORT, address) 
else 
    put "What is the IP of the computer you want to connect to?" 
    get address 
    stream := Net.OpenConnection (address, PORT) 
end if 
cls 
put "Connected to ", address 

loop 
    if hasch then 
        get message : * 
        put name%,": "..
        put stream, message
    end if 
    if Net.LineAvailable (stream) then
        get : stream, msgBack : * 
        put msgBack 
    end if 
end loop 

Please help me if you know whats wrong.
Oh and go to my website
glant.pie-conspiracy.nethttp://glant.pie-conspiracy.net

-----------------------------------
Dan
Thu May 13, 2004 2:02 pm


-----------------------------------
can i see what is wrong?

1. the title of your post

2. the loaction of your post

and

3. promoting your site or no reason, lol


this will be moved to turing help soon...

-----------------------------------
Canadian Rob
Thu May 13, 2004 2:38 pm


-----------------------------------
hey.. All you did was take the net chat code that comes with turing.. and edited the put statements.. SO REALY Nothing should be wrong..
