1. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Crash on fast reconnecting

Discussion in 'Modding Help' started by Asu, Jul 10, 2014.

  1. Asu

    Asu THD Team THD Team Forum Moderator

    Messages:
    1,580
    Hey, I tried making a little function to reconnect to the server a fast way.
    There are two problems :
    - You can get the IP of the server you're connected on, but not its port.
    - If you try disconnecting and reconnecting a fast way, you'll crash.
    Code:
    ExitToMenu();
    getNet().Connect("localhost", 50301); // I see Loading blobs... Loading rules... and stuff, and it crashes just when it's gonna connect. - Even with fake IP/port.
    Btw, I used getNet.DisconnectClient() earlier, instead of ExitToMenu(), but I thought it is a more proper way. Anyway it doesn't change anything.

    Any idea?