Community Forum

Get path to the mods folder

Forum Overview >> Farming Simulator 2009

CategoryFarming Simulator 2009
Created15.06.2009 17:25


Heady Planet-ls (Headshot XXL) 15.06.2009 17:36
Hello,

i have a lua file wich include over "extraSourceFiles" at the Landwirtschaftssimulator2009 mods folder.

how can i load a file (example: pic.png) from the same folder as the lua file? I need the path to the example file.


Felix Sorge (Unknown) 15.06.2009 17:59
Hi Headshot XXL,

extrafiles don't like "self" or "instance", just make like this:

local path = getUserProfileAppPath()
local storePic =path.."mods/sampleMod/store.png"

outi ;)

Heady Planet-ls (Headshot XXL) 15.06.2009 18:58
it works, thx


Note: Log in to post. Create a new account here.