Hello I am working with the rpg inventory system and am trying to figure out how to send my table data to my database as a string then on load have the data put back into the table from the data base so as that players always have the same items that they had from the last time that they were logged in.
here is what I have so far.
We get the players inventory from the table on exiting the client and make it into a string then that string is emited to the data base
That then prints this string into the database… note the player only has a leather hood equipped on leaving the game so all other slots are empty
{ Inventory: '{"shoulders":"None","chest":"None","hands":"None","legs":"None","feet":"None","accessory":"None","back":"None","rightRing":"None","leftRing":"None","waist":"None","trinket":"None","mainHand":"None","offHand":"None","inventory":[{"amount":1,"itemId":"None"}],"head":"Armor_Leather_Hood"}'
}
When the player reconnects we then attempt to retrieve the string and load it into the table however somewhere I have gone wrong
Does anyone by chance know the way as to which I can make this work or where I have slipped up in the bps?
Thank you for your time.