Author Topic: Caching Problem with TNAuto Join in Server Component  (Read 2239 times)

Phantom75

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Caching Problem with TNAuto Join in Server Component
« on: May 22, 2013, 03:30:49 PM »
Hi

First steps with TNAuto Join has a weird caching problem. When changing the attribute "First Level" or "Server Address" and rerun the scripts, it does not take the changes into account. It always tries to connect to the values of the first try. Restarting Unity does not help. Removing and readding the script did not help. Funny fact: The "Connect on Start"-Checkbox does show immediate effect. Restarting the server did also help. Ergo I assume, the problem lies somewhere in the server compontent.

Can you help me with this?

Cheers

Martin

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Caching Problem with TNAuto Join in Server Component
« Reply #1 on: May 22, 2013, 09:26:35 PM »
When you join a channel, you get to specify whether it's persistent or not. If it's marked as persistent, then all settings are going to be permanent, and will remain even after a server restart.

Delete "server.dat", and make sure that you are joining your channel with the "persistent" flag set to false. I know the current pro version of TNet (170) defaults to 'false', but I am not sure if the 169 available on the Asset Store does. It might default to 'true'. You can change this by modifying line 68 of TNAutoJoin. Change this:
  1. TNManager.JoinChannel(channelID, firstLevel);
...to this:
  1. TNManager.JoinChannel(channelID, firstLevel, false, 65535, null);

Phantom75

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: Caching Problem with TNAuto Join in Server Component
« Reply #2 on: May 23, 2013, 12:00:56 PM »
Hi

Thanks a lot, that did the job!

Btw: This library is simply awesome - took me 2h to get done what needed weeks in Photonserver and Co.! Really brilliant work!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Caching Problem with TNAuto Join in Server Component
« Reply #3 on: May 23, 2013, 12:20:02 PM »
:)