<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Maratis forum - How to save user data (e.g. progress/option)?]]></title>
		<link>http://forum.maratis3d.com/viewtopic.php?id=893</link>
		<description><![CDATA[The most recent posts in How to save user data (e.g. progress/option)?.]]></description>
		<lastBuildDate>Sat, 14 Dec 2013 09:24:59 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How to save user data (e.g. progress/option)?]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6082#p6082</link>
			<description><![CDATA[<p>yes, there is no ready-made solution yet,<br />it is not ideal, but when you distribute your game the file will be relative to the player.</p><p>We will work on a better solution for the future.</p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Sat, 14 Dec 2013 09:24:59 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6082#p6082</guid>
		</item>
		<item>
			<title><![CDATA[How to save user data (e.g. progress/option)?]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6080#p6080</link>
			<description><![CDATA[<p>I cann&#039;t find lua-function to work with player data. Are they exists?<br />Surely this data may be stored as lua-script<br /></p><div class="codebox"><pre><code>// pseudo-code

function SaveData()
    file = io.open(&quot;player_data.lua&quot;, &quot;w+&quot;)
    file:write(&quot;player_data_vars={}&quot;)
    for key,value in pairs(player_data_vars) do
        file:write(&quot;player_data_vars[&lt;&lt;key&gt;&gt;]=&lt;&lt;value&gt;&gt;&quot;)
    end
    file:flush()
    file:close() 
end

function LoadData()
    dofile(&quot;player_data_vars.lua&quot;)
end</code></pre></div><p> </p><p>But this code create stand-alone lua-file with platform-depends place (in Windows7 used exe-same folder). <br />Perhaps, I wrong and place not depended.</p><p>Wait yours remarks <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (Aikon)]]></author>
			<pubDate>Sat, 14 Dec 2013 07:18:47 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6080#p6080</guid>
		</item>
	</channel>
</rss>
