Author Topic: How can i check player data file saved ?  (Read 2351 times)

biyarjomandi

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 11
    • View Profile
How can i check player data file saved ?
« on: July 10, 2016, 11:45:00 PM »
hi
i setting player data and save the file to server :
  1. TNManager.SetPlayerSave ("data box/data.dat"); //set player data save path
  2. TNManager.SetPlayerData ("data1", "my data value" );
  3.  
file writes on server but it take a little time . how can i check if this file creation finished on server ?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How can i check player data file saved ?
« Reply #1 on: July 11, 2016, 01:18:03 AM »
There's no need to check. All packets are processed in a sequence. What is it you're trying to do that you need to wait for the op to finish?

biyarjomandi

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 11
    • View Profile
Re: How can i check player data file saved ?
« Reply #2 on: July 12, 2016, 06:22:13 AM »
There's no need to check. All packets are processed in a sequence. What is it you're trying to do that you need to wait for the op to finish?
let me ask another question please. a player sets data and saves that in a file by using :
  1. TNManager.SetPlayerSave ("data box/data.dat"); //set player data save path
  2. TNManager.SetPlayerData ("data1", "my data value" );
  3.  
how can i access this data and read "my data value" in "data1" key ? i think i have to use :
  1. TNManager.GetPlayerData<string>("Path/to/node);
but how ?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How can i check player data file saved ?
« Reply #3 on: July 13, 2016, 11:12:47 AM »
  1. var data1 = TNManager.GetPlayerData<string>("my data value");
or if querying another player's data:
  1. var data1 = player.Get<string>("my data value");