Author Topic: Use a password?  (Read 8644 times)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Use a password?
« Reply #15 on: July 13, 2016, 11:00:22 AM »
  1. TNServerInstance.Start(5127, serverUdpPort, lobby.remotePort, "server.dat", TNServerInstance.Type.Udp))
You're creating a server with a save file, meaning whatever persistent actions you take on it will be saved. If at any point you've created a channel with a persistent flag, that channel will always be there with whatever password you chose. You need to delete the server.dat file to clear it.

Access denied sounds exactly like it does -- can't access the file, so yes saving won't work. Conflicting results there. Either things get saved, or not.

As for the label, keep in mind that when you JoinChannel passing a scene name, it will load that scene upon joining -- so whatever you had in the original scene won't be there anymore, including the UI.

Shifty Geezer

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 9
  • Posts: 226
    • View Profile
Re: Use a password?
« Reply #16 on: July 13, 2016, 02:28:06 PM »
How do I create a server without requiring a log file? All the parameter options including a lobby port also require a filename. I tried putting in a null string and Android reports 'access to "/world.dat" is denied.' If I have to remove the log file manual, how do I do that?

As for the UI label, I'm not loading a scene. The scene is unchanging but the label or game object goes 'missing'.
« Last Edit: July 14, 2016, 03:15:55 AM by Shifty Geezer »

Shifty Geezer

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 9
  • Posts: 226
    • View Profile
Re: Use a password?
« Reply #17 on: July 13, 2016, 02:37:39 PM »
Additionally, none of my join commands are persistent, so none of my channels should be being saved anyway, as I understand it.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Use a password?
« Reply #18 on: July 16, 2016, 12:11:15 AM »
If none of your join commands are persistent, then nothing will be getting saved aside from the basic header, and whatever you set as TNManager.SetServerData.

Scene is unchanging -- how's that? Your JoinChannel passes a scene to load. It doesn't matter if you're in the same scene. It should reload a clean copy. If you want the scene to not change, pass null instead.

Shifty Geezer

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 9
  • Posts: 226
    • View Profile
Re: Use a password?
« Reply #19 on: July 17, 2016, 08:45:40 AM »
Turns out the problem was a typo, using Disable() instead of OnDisable() so the callbacks weren't being cleared.