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

Username:   Password: 
 RegisterRegister   
 Can you see whats wrong?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
G-lant




PostPosted: Thu May 13, 2004 1:43 pm   Post subject: Can you see whats wrong?

code:
%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
[url]glant.pie-conspiracy.net[/url]http://glant.pie-conspiracy.net
Sponsor
Sponsor
Sponsor
sponsor
Dan




PostPosted: Thu May 13, 2004 2:02 pm   Post subject: (No subject)

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...
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Canadian Rob




PostPosted: Thu May 13, 2004 2:38 pm   Post subject: (No subject)

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..
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  [ 3 Posts ]
Jump to:   


Style:  
Search: