Stencyl 3.4.0 is now out. Get it now!

Multiplayer Extensions Resource List

mdotedot

  • *
  • Posts: 1270
Well then we need to inspect your code very, very closely.

Because if you added the isConnect=false; in the Logout function like this:
Code: [Select]
public static function Logout(Player_ID:Float, func:Dynamic){
                // Logout = Kick player out of room
               isConnect=false;

Then this part should never be done:
Code: [Select]
  public static function hearts(){
                SecondCounter++;
                if(SecondCounter % HeartBeat == 0 && isConnect){




Maybe you can use print(trace) blocks to find out why the isConnect is not set to false.
You might be re-initialize things and/or don't use the Logout block where you think you did...

Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

RulezTeam

  • *
  • Posts: 223
Hi mdotedot,

Also, I have tried to add the code line  to this part of turn.hx (as it's present on lobby.hx)

Code: [Select]
if(text_func=="logout"){
RoomName="";
HeartBeat=0;
TurnTime=0;
Seat=0;
PlayerID=0;
[i]isConnect=false;[/i]
callBack(items[0]);
}

but nothing is changed.

That's strange, because the lobby logout works as expected.

Edit: I have added the block that I use to logout. Is this correct ?

« Last Edit: November 28, 2017, 02:05:22 am by RulezTeam »

mdotedot

  • *
  • Posts: 1270
Hi RulezTeam,

As always I strongly recommend using the examples to indicate a problem since we both can test.

I set the [ set debug on ] on the board event (Free_Tic_Tac_Toe game)

When in-game the heartbeat is shown.
When using the back button to go to the login page the heartbeat messages don't appear until I click on the login button.

So my estimation is that you somewhere have the logic to keep getting the heartbeat. 
Again: use lots of debug trace calls to inspect the flow of your game to pin-point the problem.
Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

RulezTeam

  • *
  • Posts: 223
Hi mdotedot,

thank you for your support. I have tried to use the logout block in another scene and now it's working.

I have two question about this extension :

- Should I add the line code to the "if(text_func=="logout")" too ?
- Is this extension working with Stencyl 3.5 ?

Thanks again for everything

mdotedot

  • *
  • Posts: 1270
You can put the isConnect to the text_func == logout too.
Currently you need to alter some code to work on 3.5. I've not published a 3.5 version as things might change and I wait for the official 3.5 release. If you want to use the extension on 3.5 before launch you should inspect this Thread : http://community.stencyl.com/index.php?topic=54585.0

Change code     e.target.data    to   cast(e.target, URLLoader).data

If you do that on all the multiplayer extensions it should work on 3.5

Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/