Quote:
I would even start with 3DGS network before you try ANET. 3DGS network is easier to use, you need less commands. Once that works on your LAN then you can connect through Internet or try ANET.


No! ANet needs less commands to send data and in my eyes it's much easier to understand. That's why I created it wink
If you want to send data with GS Network, you have to send it to the server and forward it to the client. ANet is doing all that for you.
The next plus is that you won't need to use the enoying command lines!
ANet offers you a lot of functions that would need a lot of time and understanding if you want to do the same with the GS networksystem.

@xxGOTARxx: There is an mistake in your main function! You program will never set the event! If you start a server or a client, the main program is shut down and won't call the enet_set_event() function smile Correct would be:

Code:
void main()
{
	
	// Set Video Mode
	video_mode = 7;
	
	enet_set_event(1,_str("sv_client_connected")); //sets the client connected event
	while(1)
	{
		if(key_s)
		{
			start_server();
			return;
		}
		
		if(key_c)
		{
			start_client();
			return;
		}
		
		wait(1);
	}	
}



Try to run this program:

Code:
#include <acknex.h>
#include <default.c>
#include "anet.h"

function client_connected(var sender, STRING* msg);

void main()
{
      level_load("");
      wait(3);
      enet_init();
      enet_set_event(1,_str("client_connected"));
      while(1)
      {
            if(key_s == ON) {enet_init_server(2300,4,_str(""));return;}
            if(key_c == ON) {enet_init_client(_str("localhost"),2300,_str("");return;}
            wait(1);
      }
}

function client_connected(var sender, STRING* msg)
{
    error("Client connected!");
}


You have to start the application 2 times (on the same computer!). First you have to open a server and after that you have to open a client. If everything works, on the server an error message will popup with the content "Client connected!".

Tell me if this is working for you.

You can also contact me on ICQ. My ICQ number is in my profil.

regards,
Peter




ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version