Tasharen Entertainment Forum
Support => TNet 3 Support => Topic started by: acronyte on October 29, 2017, 08:13:56 AM
-
How is this done?
I tried using one file on my server where all players can access, but the file gets rewritten everytime a player uses SetPlayerData.
-
Have you tried TNManager.LoadFile?
-
TNManager.SetChannelData could work as well
-
Current version of TNet I'm using for Sightseer explicitly disallows multiple players from using the same save file to avoid this kind of confusion.
SetServerData can be used by admins for important stuff that players should not be able to change - configuration, message of the day, etc.
SetChannelData in a common channel (such as the global chat channel) can be used for player-settable configuration.
Keep in mind that all players have access to all other players' data, as long as they are in the same channel -- so SetPlayerData will work too.
-
Current version of TNet I'm using for Sightseer explicitly disallows multiple players from using the same save file to avoid this kind of confusion.
SetServerData can be used by admins for important stuff that players should not be able to change - configuration, message of the day, etc.
SetChannelData in a common channel (such as the global chat channel) can be used for player-settable configuration.
Keep in mind that all players have access to all other players' data, as long as they are in the same channel -- so SetPlayerData will work too.
Thank you. I believe 'SetServerData' is the option I'm looking for, however Im not to clear on how to first create an admin.... You mentioned in another thread - SetServerData can only be done by the server's administrator. You need to SetAdmin("password") before you use those calls.
....
How do I go about creating an admin? I dont see any admin files on my server :'(
-
Yeah, one of the updates caused the admin.txt file to not be created automatically anymore. The reason is that the mAdmin list remains empty and Tools.SaveList deletes the file if list is empty.
You should be able to create it manually in ServerConfig/admin.txt.
Each line is a "password". Blank lines break processing.
-
Admin file not being created should actually be resolved in the current Pro version. I noticed it about a week ago and fixed it.