A little help with paths.

Posted By: Rich

A little help with paths. - 08/08/10 12:49

Hi, I did a little searching and testing things but I can't seem to make this work right.

I have a level that has some models in it.
The maps are stored in a folder named "maps", models in a folder named "models" and the script is run in the main directory.

I set the model up in WED, and when I run my script from sed, when the engine loads I get an error W1301 saying " "modelname": cannot open file".

I have tried this, and it does nothing:

Code:
#define PRAGMA_PATH "%EXE_DIR%\scripts\";
#define PRAGMA_PATH "%EXE_DIR%\maps\";
#define PRAGMA_PATH "%EXE_DIR%\models\";



I am probably doing something wrong but the manual doesn't really seem to help me too much, so I thought I would post here.

Thanks for reading and any suggestions.
Posted By: MrGuest

Re: A little help with paths. - 08/08/10 13:39

#define PRAGMA_PATH "%EXE_DIR%\scripts";
will add files from your GStudio7 folder (or 6 or 8)

#define PRAGMA_PATH "scripts"
will add files from your current folder the initial .c file is running from

Though when placing models in WED, it creates the model to the same directory as the running .wmp file


Posted By: Ditje

Re: A little help with paths. - 08/08/10 13:41

I am not sure, but I had this problem today, too. I could everything (sounds, bmps and scripts) move to folders and engine found them. But for .mdl-files I got an error message of missing files, too.

So I suppose it`s not possible with mdl-files.

edit: I used: define PRAGMA_PATH "snd"

Ditje
Posted By: pararealist

Re: A little help with paths. - 08/08/10 14:41

I think you have to put this also in your setup function
or main.
add_folder("scripts");
add_folder("maps");
add_folder("models");
this works for me.
Its all a little transparent in the manual sometimes.
Posted By: Rich

Re: A little help with paths. - 08/08/10 15:15

Thanks for all of the replies laugh MrGuest's suggestion worked for me.

I have to agree about the manual being confusing at times, but I'm grateful for the community.

Thanks again!
© 2024 lite-C Forums