indriApollo
Member
Posts: 146 Joined: Fri Sep 26, 2014 11:34
GitHub:
indriApollo
IRC: indriApollo
In-game: SudoAptGetPlay
Location: Belgium
Contact:
by indriApollo » Sat Dec 27, 2014 15:57
Post
Hi,
How do you get a table with the entire player inventory so it can be serialized to a text file ?
I'm trying to make a save/restore function.
I tried
Code: Select all
local player_inv = player:get_inventory()
local inv_list = player_inv:get_list("full_inv")
without much result :/
twoelk
Member
Posts: 1482 Joined: Fri Apr 19, 2013 16:19
GitHub:
twoelk
IRC: twoelk
In-game: twoelk
Location: northern Germany
by twoelk » Sat Dec 27, 2014 17:37
Post
like the info dumped into the player files?
indriApollo
Member
Posts: 146 Joined: Fri Sep 26, 2014 11:34
GitHub:
indriApollo
IRC: indriApollo
In-game: SudoAptGetPlay
Location: Belgium
Contact:
by indriApollo » Sat Dec 27, 2014 19:13
Post
I want something like fwritef in C. The text file doesn't have to be human readable. I'm making a mod which clears the players inventory when he enters a certain area and I want to be able to give his stuff back once he leaves.
Users browsing this forum: No registered users and 3 guests