how to store meta_data in a player?

cesarpachon
Member
 
Posts: 11
Joined: Sat Nov 22, 2014 04:00
GitHub: cesarpachon
IRC: hydalgo
In-game: hydalgo

how to store meta_data in a player?

by cesarpachon » Fri May 13, 2016 20:47

I want to store some status (coin counter) per player. my first attempt was player:getpos followed by minetest.get_meta, but that seems to be stored the info at the current player position, not in the player itself.

is possible to store meta data in a player? if not, what is the suggested approach?
just a digital hermit
http://www.cesarpachon.com
 

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

Re: how to store meta_data in a player?

by burli » Fri May 13, 2016 20:56

 

cesarpachon
Member
 
Posts: 11
Joined: Sat Nov 22, 2014 04:00
GitHub: cesarpachon
IRC: hydalgo
In-game: hydalgo

Re: how to store meta_data in a player?

by cesarpachon » Fri May 13, 2016 21:13

thks, looks like the right approach is to use text files. I already had tried that but with a fixed filename, and then I thought it was bad because the file is unique for all players. the solutions I see in your posts uses files, but with the player name as name of the file. clever.
just a digital hermit
http://www.cesarpachon.com
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 5 guests

cron