27.02.2012, 15:50
Hello everyone,
I'm in trouble because i have a problem that i don't understand.
The instruction block of the callback OnPlayerDisconect() idn't executed.
This "code" is a proff, because no message(s) appear in the server console a player left.
I set some "debug messages" in the functions called in this callback (RefresgGangMembers() and CheckGangClosed() )
and no messages appear to.
This "slice of script" is in a FilterScript and the callback is called in other FS and in the GM.
But that's not all!
When I set the callback to always return "0"... nobody can connect to the server: the Sa:Mp client loads (we can see a black screen) and quit.
WTF?!
A server script makes a client buging like this?! WTF?!
Seriously, i probably made an enourmous mistake and i hope someone(s) can help me.
I hope the mistake is completly my fault and not the Sa:Mp team fault!
Hopefully, Jujuv.
PS:Sorry about my English.I'm french
I'm in trouble because i have a problem that i don't understand.
The instruction block of the callback OnPlayerDisconect() idn't executed.
Код:
public OnPlayerDisconnect(playerid, reason) { print("Callback disconect CALLED so instructions block is executed");//Debug message gPlayerConnected--;//TY Moathib for the idea printf("Joueurs connectйs: %d", gPlayerConnected);//Debug message RefreshGangMembers();//We just call a function CheckGangClosed();//We just call a function return 1; }
I set some "debug messages" in the functions called in this callback (RefresgGangMembers() and CheckGangClosed() )
and no messages appear to.
This "slice of script" is in a FilterScript and the callback is called in other FS and in the GM.
But that's not all!
When I set the callback to always return "0"... nobody can connect to the server: the Sa:Mp client loads (we can see a black screen) and quit.
WTF?!
A server script makes a client buging like this?! WTF?!
Seriously, i probably made an enourmous mistake and i hope someone(s) can help me.
I hope the mistake is completly my fault and not the Sa:Mp team fault!
Hopefully, Jujuv.
PS:Sorry about my English.I'm french
