How to save a table to a string and convert it back to a table

Post Reply
LC Creations
Member
Posts: 77
Joined: Mon Feb 18, 2019 02:53

How to save a table to a string and convert it back to a table

by LC Creations » Post

I need to save an entire table to a string then convert it back to a table when the server is opened up.

User avatar
Andrey01
Member
Posts: 2371
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: How to save a table to a string and convert it back to a table

by Andrey01 » Post

To convert a table to the string, use minetest.serialize()

To convert back, use minetest.deserialize()

https://github.com/minetest/minetest/bl ... .txt#L5414

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest