#include - more than one folder

Posted By: James_Burke

#include - more than one folder - 12/30/07 09:50

Hi,
This bug is a little annoying and has been around for at least the few releases. In Lite-C if you use #include "folder\folder\script.c" (for example, I have the main script then a scripts folder and then a header folder within it) WED will be unable to open it, however, it will compile and run fine.

This really only causes problems when WED will automatically update the scripts and will pop up with errors saying "Can't open script file 'file'". It just becomes irritable

Thanks,
James
Posted By: HeelX

Re: #include - more than one folder - 12/30/07 10:02

Yep, that isn't working. Though, you can extract all actions you need into an "actions.wdl" and assign it to your level. By this, WED just reads in leightweight data and not your whole project. In addition, you can also turn those crappy actions into real procedures.
Posted By: theplayer

Re: #include - more than one folder - 09/30/09 16:39

hi,

i know this thread is really old but i have still one big problem. what is a "real procedure"? i found nothing about in the manual.
is there another way to solve the problem because i want to let my actions in their files.
thanks for your help.

greets theplayer
Posted By: jcl

Re: #include - more than one folder - 09/30/09 16:46

WED does not use the path from include files. But you can use either PRAGMA_PATH, or a WDL file with a path statement.
Posted By: theplayer

Re: #include - more than one folder - 09/30/09 16:55

hi jcl,

thanks for your fast help. i've defined a PRAGMA_PATH to my project folder and reopened the project but for every included file as seen below, occurs the error "can't open script file".

Code:
#define PRAGMA_PATH "C:\Documents and Settings\theplayer\My Documents\3DGS Projects\Project1"

#include <environment.c>
#include <actions.c>
#include <graphics.c>
#include <camera.c>
#include <shader.c>



the problem is to use both, the materials from the shader.c and the actions from the actions.c. how would this be done?

greetz theplayer
Posted By: DJBMASTER

Re: #include - more than one folder - 09/30/09 18:04

Try using double slashes in your PRAGMA_PATH statement...
Code:
#define PRAGMA_PATH "C:\\Documents and Settings\\theplayer\\My Documents\\3DGS Projects\\Project1"


Posted By: theplayer

Re: #include - more than one folder - 09/30/09 18:10

hi djbmaster,

thats it. now i can load all files. thanks.
i've also found the artice in the manual about wdl files. how is the path described there? i tested path=".\\code" to set the path to my code directory. but its a syntax error

greets theplayer
© 2024 lite-C Forums