[Gambas-user] App Path

Benoit Minisini gambas at ...1...
Sat Jun 12 08:38:43 CEST 2004


On Saturday 12 June 2004 06:19, Devin Hassan wrote:
> Hello,
> This is how I load my tiles.
> e = "/home/Devlin/SlayerMap/Dungeon/0073.png"
>
> As e is the variable I use to display the tile.
>
> My question here is how can I load the tile from the App Dir?
> like "/SlayerMap/Dungeon/0073.png"
>
> This of course does not work. and if I enter the above code it will only
> work on my computer because everyone does not have the /Devlin directory on
> there computer. So how can I load my tiles in the
> /Dungeon directory using code that lets me load out of the app path.
> I have over 350 tiles in my map editor so far. Thanks
>
> Devlin
>

If the file you want to load is part of your project (i.e. located inside the 
project), then you must use relative paths, like "Dungeon/0073.png".

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list