Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (AndrewAMD, TipmyPip, VoroneTZ, Quad, 1 invisible), 688 guests, and 11 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
PATH, relative paths, runtime creation - and problems #450958
04/25/15 18:33
04/25/15 18:33
Joined: Jul 2002
Posts: 3,208
Germany
Error014 Offline OP
Expert
Error014  Offline OP
Expert

Joined: Jul 2002
Posts: 3,208
Germany
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

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?

Last edited by Error014; 04/25/15 18:35. Reason: Added work_dir-information

Perhaps this post will get me points for originality at least.

Check out Dungeon Deities! It's amazing and will make you happy, successful and almost certainly more attractive! It might be true!
Re: PATH, relative paths, runtime creation - and problems [Re: Error014] #450967
04/25/15 23:16
04/25/15 23:16
Joined: Jul 2002
Posts: 3,208
Germany
Error014 Offline OP
Expert
Error014  Offline OP
Expert

Joined: Jul 2002
Posts: 3,208
Germany
add_path works, actually! My mistake. I didn't realize add_new resets those, apparently also including the PATH-instructions!


Perhaps this post will get me points for originality at least.

Check out Dungeon Deities! It's amazing and will make you happy, successful and almost certainly more attractive! It might be true!
Re: PATH, relative paths, runtime creation - and problems [Re: Error014] #450970
04/26/15 01:06
04/26/15 01:06
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Good to know!


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: PATH, relative paths, runtime creation - and problems [Re: Superku] #451876
05/24/15 20:34
05/24/15 20:34
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
and you have a maximum of I think 30 PATH statements.

Considering resourcing I found out that using relative pathes everywhere can become pretty painful. Relative pathes allow multiple files with the same name - a resource doesn't. Not so much fun to hunt down such problems without knowing what you're actually searching for.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1