Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (EternallyCurious, Quad, vicknick), 700 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 4 1 2 3 4
Re: ANET; please save me!! [Re: Dark_samurai] #256915
03/19/09 14:45
03/19/09 14:45
Joined: Jun 2006
Posts: 2,640
Earth
Germanunkol Offline
Expert
Germanunkol  Offline
Expert

Joined: Jun 2006
Posts: 2,640
Earth
Ah, I'm sorry. I had it downloaded but totally forgot.
here you go:
"Error: The Side-by-Side configuration information for "h:\download\windows\3dgs\anet\anet_simple_3dchat_eng_1.1\anet_simple_3dchat_eng_1.1\lite-c\ANET.DLL" contains errors. Diese Anwendung konnte nicht gestartet werden, weil die Anwenungskonfiguration nicht korrekt ist. Zur Problembehebung sollten Sie die Anwendung neu installieren (14001).
Error: At least one required implicit or forwarded dependency was not found.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module."

that's what I get when opening ANet (the one in the 3dgschat demo, liteC version) with dependency walker.
does that help?


above this it says "error opening file, the system can't find it" (or something like that, translated from german) to the following files:
MSVCR90D.DLL
EFSADU.DLL
MSJAVA.DLL

[edit]
Okay, found EFSADU.DLL and MSJAVA.DLL and downloaded them. but MSVCR90D.DLL seems to be a problem that many VC users have. All of them also had their projects on different partitions/drives than their main Windows folder. Same here, I have it on H: and Windows is on C:. But copying the project to C: doesn't help me at all...
[/edit]

Last edited by Germanunkol; 03/19/09 15:27.

~"I never let school interfere with my education"~
-Mark Twain
Re: ANET; please save me!! [Re: Germanunkol] #256938
03/19/09 16:46
03/19/09 16:46
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
Download the ANet.dll again. You have an old version (this was a bug of 1.1.1.1). The latest version (1.1.2.1) fixes this bug.


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: ANET; please save me!! [Re: Dark_samurai] #256980
03/19/09 20:35
03/19/09 20:35
Joined: Jun 2006
Posts: 2,640
Earth
Germanunkol Offline
Expert
Germanunkol  Offline
Expert

Joined: Jun 2006
Posts: 2,640
Earth
It's working!! You were right, I just had to copy the dll from the demo into the chat-workshop's folder.
Thanks a lot smile
I'll check out these functions now... if this works out for us, maybe you'll have another sold copy soon smile


~"I never let school interfere with my education"~
-Mark Twain
Re: ANET; please save me!! [Re: Germanunkol] #257076
03/20/09 12:16
03/20/09 12:16
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
Good to hear! smile

Just tell me, if you have problems again.


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: ANET; please save me!! [Re: Dark_samurai] #257826
03/25/09 18:58
03/25/09 18:58
Joined: Jun 2006
Posts: 2,640
Earth
Germanunkol Offline
Expert
Germanunkol  Offline
Expert

Joined: Jun 2006
Posts: 2,640
Earth
I ran into another problem:

enet_set_playername()
when I call this on the host (server AND client initialized. That part worked. I made sure enet_get_connection() returns 3 as well) then enet_get_clientid is -1, because it's a server, but enet_set_playername seems to work with the client id? which is then not a valuable one, cause it's negative?


~"I never let school interfere with my education"~
-Mark Twain
Re: ANET; please save me!! [Re: Germanunkol] #257832
03/25/09 19:57
03/25/09 19:57
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
This can't be:

1) In Client-Server mode, enet_get_clientid() normally should return 0.
2) enet_set_playername() returns a warning if clientid is negative! (Did you turned of the warnings with anet_set_warning()?)

=> Either you display a wrong value or enet_set_playername() is called before the clientid is set to -1.

Do you use a password protected server? Because there is a bug in the current version that always disconnects the client even if a correct password is sent.
(Fixed in 1.2.1.1 that will be released soon with more new features wink ).

Can you post your code?


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: ANET; please save me!! [Re: Dark_samurai] #257915
03/26/09 14:23
03/26/09 14:23
Joined: Jun 2006
Posts: 2,640
Earth
Germanunkol Offline
Expert
Germanunkol  Offline
Expert

Joined: Jun 2006
Posts: 2,640
Earth
again, my bad.
I missed this:
"ATTENTION: The client gets its clientid after the connection with the server is established. => the clientid is NOT immediately available after initializing the client! "
(how could I miss it? the ATTENTION is bold AND in capitals...)
Now the clientId is correct.

but the program still doesn't work.

Code:
void startupHost()
{
	initEvents();
	var initResult=0;var initResult2=0;
	initResult = enet_init_server(port,maxPlayers,_str(""));
	initResult2 = enet_init_client((userData.pstring)[2],port,_str(""));
	if(initResult == 1 && initResult2 == 1)
	{
		logNewMessage("--Server started. Connected as Client.");
		wait(15);		//wait for clientid to be set
		wait(-1);
		my_temp[1] = enet_get_clientid();
		STRING* playername = str_create("testname");
		enet_set_playername(playername);
	}
	else
	{
		logNewMessage("--Could not connect. Exiting.");
		sys_exit("NULL");
	}
}



in main:
	wait(-2);
		STRING* tmpPlayerNameStr = str_create("");
		var result1;
	result1 = enet_get_playername(enet_get_clientid(),tmpPlayerNameStr);
	if(result1 == -1)beep();
	str_cpy((userData.pstring)[0],tmpPlayerNameStr);


It beepes (or beep();es). I tried, as you can see, various waiting times..
it seems to give back an empty string or something in enet_get_playername, because if I copy it into the userData text, the string in the userData text seems to be deleted, resulting in the strings [1], [2] and so on to be moved upwards.

Is there any way to say how long exactly I have to wait untill the clientId is set? I do get the error message "no clientId" if I don't wait 5 frames after the client initialization. just like the manual states. but how long do I have to wait? does it depend on the connection?

What makes it even more confusing is that this:
Code:
	wait(-2);
	STRING* tmpPlayerNameStr = str_create("testname");
	enet_set_playername(tmpPlayerNameStr);
	str_cpy(tmpPlayerNameStr,"            ");
	var result1;
	result1 = enet_get_playername(enet_get_clientid(),tmpPlayerNameStr);
	if(result1 == -1)beep();
	str_cpy((userData.pstring)[0],tmpPlayerNameStr);

makes it work (all called in one go, inside main, so enet_set_playername is not in the same function as enet_init_client), but when I pass an empty string (str_cpy(tmpPlayerNameStr," "); replaced by str_cpy(tmpPlayerNameStr,"");) it crashes the program.


sorry, I'm confused...O.o


another update: In the chat-demo-tutorial I found that calling wait(4); between initializing a server and a client (on the same machine) is a good thing. I didn't yet because in the manual I found this:

Code:
void start_clientserver() 
{ 
//Client-Server Modus: 
enet_init_server(2300,4,_str("")); //Initializes the server 
enet_init_client(_str("127.0.0.1"),2300,_str("")); //Initializes a client 
//which connects over the localhost with the server 
} 

without wait(4). If I DO wait(4);, then I got a "bad client id in enet_get_playername". Of course, now that I'm typing this I can't recreate that error message, it's back to as it was before: string gets deleted from the text...

Last edited by Germanunkol; 03/26/09 14:40.

~"I never let school interfere with my education"~
-Mark Twain
Re: ANET; please save me!! [Re: Germanunkol] #257928
03/26/09 16:36
03/26/09 16:36
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
Quote:
Is there any way to say how long exactly I have to wait untill the clientId is set?


Yes, the clientid is set after the connected with server event is called or you put a while(enet_get_clientid() == -1) {wait(1);} into your code wink

Normally you start the client and a little bit later the connected with server event is called and from here you start the functions that control your game. Then you can be sure that the connection is set up correctly.

This should solve your problems. A howto of correct setting up a connection is already added to the new manual which will be released with the new version.

Code:
void start_clientserver() 
{ 
//Client-Server Modus: 
enet_init_server(2300,4,_str("")); //Initializes the server 
enet_init_client(_str("127.0.0.1"),2300,_str("")); //Initializes a client 
//which connects over the localhost with the server 
} 


This code only initializes a server and then a client and doesn't meen that the clientid is available after the client is initialized.


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: ANET; please save me!! [Re: Dark_samurai] #258096
03/27/09 18:09
03/27/09 18:09
Joined: Jun 2006
Posts: 2,640
Earth
Germanunkol Offline
Expert
Germanunkol  Offline
Expert

Joined: Jun 2006
Posts: 2,640
Earth
Okay, I'm getting there.
It's working now, sending and receiving, and I'm sort of getting what I want (only after looking very closely at the chat-demo though, maybe I'm just... stupid -.-)
The problem that I'm having most of the time that all liteC tells me is "crash in...", which is not being very helpful.

"ATTENTION: In the client/server mode the event is called twice! Once for the server and once for the client! "
there's no workaround for this...?
I mean, the host doesn't know whether this event has already been received by him or not...
I just get all chat messages twice on the host...
and I can't figure out how the chat-demo does it...

Sorry, again, piling up the questions. I just wanna get these basics down, thanks to you I've gotten MUCH further.

[edit] oh, and a feature request: could you make enet_get_playername accept empty strings somehow? I had quite a few crashes because I did this at first:
STRING* tmpPlayerName = str_create("");
enet_get_playername(senderorsomeone,tmpPlayerName);

this:
Code:
STRING* tmpPlayerName = str_create("          ");
enet_get_playername(senderorsomeone,tmpPlayerName);

works fine though.
Since the program just quits it was very hard to find that bug.
[edit]

Last edited by Germanunkol; 03/27/09 18:14.

~"I never let school interfere with my education"~
-Mark Twain
Re: ANET; please save me!! [Re: Germanunkol] #258115
03/27/09 19:29
03/27/09 19:29
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
Quote:
The problem that I'm having most of the time that all liteC tells me is "crash in...", which is not being very helpful.


Therefor the warning system of ANet is implented. In theory it should turn all crashes into warnings that should help you to find the problem easier.

Can you tell me some of the crashes you had, so I can add a warning?

Quote:
"ATTENTION: In the client/server mode the event is called twice! Once for the server and once for the client! "


Hehe I'm a bit faster than you. It's already changed wink
The event system is now much clearer designed.

I hope that I can release the new version at the end of this weekend.

Quote:
could you make enet_get_playername accept empty strings somehow?


Why don't you just initialize the string with 30 chars? I think I will add a warning for this, but it makes no sence for me to support empty strings.


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

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1