Author Topic: Remove child not working  (Read 393 times)

acronyte

  • Newbie
  • *
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 46
    • View Profile
Remove child not working
« on: October 24, 2017, 03:55:58 PM »
how would i go about deleting a child item from my player data file?
Lets say the file on the server (content below) is save using text (not binary) :

  1. Version 198897
  2.         data1 = "1"
  3.         data2 = "2"
  4.         data3 = "3"
  5.        

How would i remove "data3" from the hierarchy?

I know about "TNManager.playerData.RemoveChild".....but that doesnt work in this case.

devomage

  • Sr. Member
  • ****
  • Thank You
  • -Given: 7
  • -Receive: 67
  • Posts: 250
    • View Profile
Re: Remove child not working
« Reply #1 on: October 24, 2017, 04:47:01 PM »
Try this:

  1. TNManager.SetPlayerData("data3", null);

acronyte

  • Newbie
  • *
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 46
    • View Profile
Re: Remove child not working
« Reply #2 on: October 24, 2017, 05:48:47 PM »
Try this:

  1. TNManager.SetPlayerData("data3", null);

This works ...thanks!