Posted By: Error014
PATH, relative paths, runtime creation - and problems - 04/25/15 18:33
Hello all!
I'm having trouble with PATH-statements. I used to have lots of trouble with those (basically: they did not work), gave up and simply gave the needed relative path everywhere, like so
But that makes working with warn_level=3 impossible. So I tried it again, and then it worked. For reference, this is my .wdl-file
Sidenote: The manual-example for PLUGINDIR uses an equal-sign, but the Plugins ACTUALLY seem to work
So I changed all paths so the code above would look like
And everything was well.
Until recently. Out of nowhere, the PATH-statements again stopped working. If I re-add the local paths (like in the first code-bit), it works. And the PATH-statements are taken into account for directly defined stuff, such as something like
But anything I create at runtime only works if I add the subdirectory to the filename. No matter if bmap_create or ent_create.
I can't use PRAGMA_PATH, because that doesn't work with the published version, and I need it to work there.
"add_path" changed nothing.
I know that the .wdl-file is read, since without it the direct definitions wouldn't work (and I can tell from what plugins are read).
Reading out work_dir implies that I am in the correct folder, so that "Tiles" and the others are actually the subfolders there.
What am I doing wrong?
I'm having trouble with PATH-statements. I used to have lots of trouble with those (basically: they did not work), gave up and simply gave the needed relative path everywhere, like so
Code:
ent_create("Models\\tile.mdl",...
But that makes working with warn_level=3 impossible. So I tried it again, and then it worked. For reference, this is my .wdl-file
Code:
PATH "Tiles"; PATH "Models"; PATH "Sprites"; PATH "Sounds"; PATH "HUD"; PLUGINDIR "Plugins";
Sidenote: The manual-example for PLUGINDIR uses an equal-sign, but the Plugins ACTUALLY seem to work
So I changed all paths so the code above would look like
Code:
ent_create("tile.mdl",...
And everything was well.
Until recently. Out of nowhere, the PATH-statements again stopped working. If I re-add the local paths (like in the first code-bit), it works. And the PATH-statements are taken into account for directly defined stuff, such as something like
Code:
BMAP* selectormap = "selector.bmp";
But anything I create at runtime only works if I add the subdirectory to the filename. No matter if bmap_create or ent_create.
I can't use PRAGMA_PATH, because that doesn't work with the published version, and I need it to work there.
"add_path" changed nothing.
I know that the .wdl-file is read, since without it the direct definitions wouldn't work (and I can tell from what plugins are read).
Reading out work_dir implies that I am in the correct folder, so that "Tiles" and the others are actually the subfolders there.
What am I doing wrong?