J
jana
Guest
Hi, I'm trying to run a server and a client on my laptop. The server starts, but I get an error when I try to create a client.
and here's the script client_connect:
I'd be grateful for any ideas on why it's not connecting.
This code runs in the client's Create event:___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Create Event
for object oClient:
Could not connect client to server.
at gml_Script_client_connect
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_client_connect (line 0)
gml_Object_oClient_Create_0
Code:
connect = client_connect("my.ip.address", 50000);
Code:
var
ip = argument0,
port = argument1,
connect = -1;
socket = network_create_socket(network_socket_tcp);
while ( (connect < 0) && (port <= 65000) )
{
connect = network_connect_raw(socket, ip, port);
port += 1;
}
if (connect < 0)
{
show_error("Could not connect client to server.", true);
}