<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Where do I put my .dat files?</title>
		<link>http://www.allegro.cc/forums/view/612302</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sat, 30 Mar 2013 16:41:13 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ve recently added some .dat files to my game to store the coords of my enemies and coins, it all works fine when I&#39;m working on it.<br />The problem is that the game bugs out when once I&#39;ve installed it on my machine. I&#39;m using advanced installer, and I&#39;m not sure where to place the files. I&#39;ve tried placing them where the game itself is, but that didn&#39;t work. It also didn&#39;t work placing the files where my sprites are. So where do I place them? <br />(Sorry if I&#39;m not clear enough, I wasn&#39;t sure how to explain this)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (DJLad16)</author>
		<pubDate>Thu, 28 Mar 2013 23:23:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If they&#39;re in the same place as your sprites, and the sprites load yet the data files do not, are you specifying the paths differently when loading them?</p><p>Make sure that your installer is setting the &quot;working directory&quot; for the app&#39;s shortcut to the same path that it is installed in.  It looks like it&#39;s called &quot;Start in&quot; in Windows 7.  Been a while since I even thought about that sort of thing.  <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (StevenVI)</author>
		<pubDate>Fri, 29 Mar 2013 00:22:06 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yeah, what Steven said!</p><p>Basically the folder where your game runs whilst you&#39;re working on it will probably be very different to the folder it runs in when you install it!</p><p>So you have to use a function to get the <b>working directory</b> as a string, so you can use something like this pseudo code <span class="source-code">load_dat_file<span class="k2">(</span>workingDirectory <span class="k3">+</span> <span class="s">"/datafiles/mydatfile.dat"</span><span class="k2">)</span></span>. There is a way to do this using allegro, but I&#39;m not going to tell you how, mainly because I can&#39;t remember ATM.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Dizzy Egg)</author>
		<pubDate>Fri, 29 Mar 2013 01:43:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/612302/979312#target">Dizzy Egg</a> said:</div><div class="quote"><p>So you have to use a function to get the working directory as a string, so you can use something like this pseudo code load_dat_file(workingDirectory + &quot;/datafiles/mydatfile.dat&quot;). There is a way to do this using allegro, but I&#39;m not going to tell you how, mainly because I can&#39;t remember ATM.
</p></div></div><p>

<span class="source-code">workingDirectory <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_get_current_directory"><span class="a">al_get_current_directory</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></span>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Roy)</author>
		<pubDate>Fri, 29 Mar 2013 22:45:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It&#39;s good to see you were able to get loading your data from a file working.  Just in case you weren&#39;t aware - you don&#39;t have to use the .dat extension on your files.  I just used that with the code I sent you to as an example.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (LennyLen)</author>
		<pubDate>Fri, 29 Mar 2013 23:04:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/612302/979340#target">NiteHackr</a> said:</div><div class="quote"><p> al_get_current_directory()</p></div></div><p>Isn&#39;t the OP talking about Allegro 4?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Sat, 30 Mar 2013 12:44:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/612302/979397#target">Arthur Kalliokoski</a> said:</div><div class="quote"><p> Isn&#39;t the OP talking about Allegro 4?</p></div></div><p>No.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (LennyLen)</author>
		<pubDate>Sat, 30 Mar 2013 16:41:13 +0000</pubDate>
	</item>
</rss>
