Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, 7th_zorro, VoroneTZ, Quad), 901 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Connected but not Joined to Session ... problem #421690
04/23/13 07:11
04/23/13 07:11
Joined: Nov 2008
Posts: 28
Athens, Greece
NeoJT Offline OP
Newbie
NeoJT  Offline OP
Newbie

Joined: Nov 2008
Posts: 28
Athens, Greece
Hi... (and sorry for my english)

Before 2 days i had a problem and finally last night i solved
but i have no idea how and why...

I have 3 files.

1) 1 for server. "server.c"
2) 1 for client. "client.c"
3) and 1 for global funtion and variables "fandv.c"

The 1st and the 2nd file use the 3d file...

This was my problem.

the server has created normal...
but the client has connected ONLY and NOT JOINED to session

I have create and others server-clients in 3dgamestudio - lite-c BUT NERE I HAD THIS
PROBLEM...

the 1st file "server" and the 2nd file "client" have one function call which is inside the 3d file...

f_start_server_client(void* l_str);
or
f_start_server_client(STRING* l_str);

Inside this function :

1) compare the l_str whith the string that give it the server or client
2) if it is "server" run server
3) if it is "client" run client...

I was try to run server... ok
I was try to run client... ok

in my last version of that program i was changed the string "server" to "server_login".

then next try to run the server was... ok
but
next try to run the client was ... connected with the session but not joined. dplay_status = 1;

( Thanks to God i have backup of my old files i finally i fix it. )

I was try to run older backup... and running
I was try to run the new... problem

the older backup have difference in variables... functions... etc.
but yesterday i change one backup to new and i found this :

ALL MY CODE IS OK... BUT

When i call from server the function f_start_server_client

I MUST GIVE TO PARAMETER A STRING WITH THE SAME LENGTH TO STRING FOR CLIENT.

example:

i had call f_start_server_client("Server") ... the parameter length = 6.
and
i had call f_start_server_client("Client") ... the parameter length = 6.

when i had make that change "server" to "server_login" i had the problem
because :
f_start_server_client("Server_Login") ... the parameter length = 12.
f_start_server_client("Client") ... the parameter length = 6.


BUT I DONT KNOW WHY WHY WHY WHY WHY WHY WHY WHY WHY ???


and why i wrote that... ?
1st) if can anyone help me to understand the solution and
2nd) if anyone have the same problem to think that solution if he has done the same mistake...

my solution was to convert the string "Server_Login" to int _server_login_int = 1;
and "Client" to int _client_int = 2;
and the type parameters in function i have changed

------------------------------------------------
from
function f_start_server_client(STRING* l_str)
---------------- >>
to
function f_start_server_client(int l_int)

------------------------------------------------
and inside the function :
----------------
from :
if (str_cmp(l_str, "Server_Login") )
{
...
}
if (str_cmp(l_str, "Client") )
{
...
}

---------------- >>
to :
switch (l_int)
{
case (_server_login_int):
{
...
}
break;
case (_client_int):
{
...
}
break;
}
------------------------------------------------

IF CAN ANYONE TELLS ME WHY I CANT SEND STRING WITH DIFFEREND LENGTH... PLEASE...

and thanks to GOD "SERVER" and "CLIENT" have the same length 6 and for that reason i
hadnot problem in my olders programs before...


THX you all (and sorry for my english).

Best Regards.
Dimitris.

Re: Connected but not Joined to Session ... problem [Re: NeoJT] #429061
09/08/13 09:37
09/08/13 09:37
Joined: Jan 2006
Posts: 968
EpsiloN Offline
User
EpsiloN  Offline
User

Joined: Jan 2006
Posts: 968
I just ran into the same problem. However , I'm not sending anything to the server or evaluating any strings for now.
All I do is

Code:
function client_connect_to(STRING* ip_string,STRING* session_id)
{
	session_connect(session_id, ip_string);
	while(dplay_status < 2) wait(1); // wait until the session is opened or joined



DPlay Status is stuck on 1 on client , server says 8.
The code for the server is only session_open , wait 5 sec. level_load("empty.wmb") ...
I just ran into a post, the problem was solved by reinstalling, but I might try it later.

PS.: Just to inform you that this problem occurs even without the evaluation of the strings that you mention.
*EDIT*
I just found out why it was happening in my project.
I used #ifdef server | #else | #endif and #define server for server app and //#define server in client (started in "Run current script")
After removing those #defines I used if(connection == 1 || 3) else{} and started using "Test Run". Everything works fine, dplay_status goes up to 6 on client with entity created and rotated by server.

Last edited by EpsiloN; 09/08/13 11:59.

Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201

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