
-----------------------------------
1kd7
Mon Dec 01, 2014 2:20 pm

Turing Chat Program
-----------------------------------
What is it you are trying to achieve?
I am trying to make a Chat program that can be added to other programs but it keeps stopping when I try to type something in the ChatEnter text Field. 




Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)



import GUI
const Port : int := 5055
var choice : int
var Done : int := 0
var ChatBox : int
var ChatEnter : int
View.Set ("graphics:max;max,nobuttonbar")
loop
    put "Enter 1 to run server"
    put "Enter 2 to join server"
    put "Choice: " ..
    get choice
    exit when choice = 1 or choice = 2
end loop
var netStream : int
var netAddress : string

if choice = 1 then
    put Net.LocalAddress
    netStream := Net.WaitForConnection (Port, netAddress)

else
    put "Enter the address to connect to: " ..
    get netAddress
    netStream := Net.OpenConnection (netAddress, Port)
    if netStream 