[WED] Can't work with foldered scripts?

Posted By: WickWoody

[WED] Can't work with foldered scripts? - 05/25/13 12:45

Hi,

I decided to tidying my work files. I foldered them seperately like "models", "audio", "script", "levels" etc. When I tried to select map's script as "main.c", then I got a error message which says "player.c" couldn't open. My directory is like;

Code:
- deved (main folder)
  - levels
  - audio
  - scripts
  - images
  - models
  * main.c
  * settings.c



WED can't open the files which I store them in a sub-folder like "scripts". I included them in main.c. I used the PRAGMA_PATH and include. But doesn't work.

What should I do?

Thanks in advance.
Posted By: Anonymous

Re: [WED] Can't work with foldered scripts? - 05/25/13 21:19

Wed has issues - I just keep all my scripts in the main folder till I'm finished.
Posted By: Det

Re: [WED] Can't work with foldered scripts? - 05/25/13 22:36

The easy way is to do all Scprits Models and Pictures and Level files to do in your Game Folder . Then you include you Scrpts in your main Script like Enemy and so on . Start the main Script and it works. You can also use the Work Folder in Gamestudio with all your files .
Posted By: WickWoody

Re: [WED] Can't work with foldered scripts? - 05/25/13 23:05

I understand, thank you.
Posted By: rayp

Re: [WED] Can't work with foldered scripts? - 05/27/13 08:09

Use
Code:
pragma_path

fex. to add folders via script. So easy is this.
Quote:
A7.10 Looks for include and other files in the given path when they are not found in the current folder. This is similar to the PATH statement in a project file, with the exception that paths given by PRAGMA_PATH are also used for include files. Example:
#define PRAGMA_PATH "%EXE_DIR%\Map-Editor\Scripts";
Posted By: WickWoody

Re: [WED] Can't work with foldered scripts? - 05/28/13 13:47

Originally Posted By: WickWoody

I used the PRAGMA_PATH and include.


I said that I'm already using it.
Posted By: rayp

Re: [WED] Can't work with foldered scripts? - 05/29/13 04:51

Sorry. But pragma_path works normally.
Posted By: Dveyee

Re: [WED] Can't work with foldered scripts? - 05/29/13 07:48

Maybe you setup the PRAGMA_PATH wrong. At the top of your main.c it should look something like this :
Code:
#define PRAGMA_PATH "models"
#define PRAGMA_PATH "audio"
#define PRAGMA_PATH "scripts"
#define PRAGMA_PATH "scripts\some_sub_directory"
#define PRAGMA_PATH "levels"


Then when you run your main.c, it should find all the scripts.
© 2024 lite-C Forums