Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,094 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
#define PRAGMA_PATH for published game #393908
02/08/12 12:14
02/08/12 12:14
Joined: Nov 2003
Posts: 433
The Netherlands
T
Toon Offline OP
Senior Member
Toon  Offline OP
Senior Member
T

Joined: Nov 2003
Posts: 433
The Netherlands
Hey,

I defined a path for my image-files and it all works fine, but how can I also make it work with the published game, because if I create a map 'images' in the .cd directory and put the images in there, the .exe can't find them.

This is my definition:
Code:
#define PRAGMA_PATH "images";



laugh Thanks for reading!

Re: #define PRAGMA_PATH for published game [Re: Toon] #393911
02/08/12 12:19
02/08/12 12:19
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
You could create a wdl with the same name as your c that contains a PATH statement.

Re: #define PRAGMA_PATH for published game [Re: Rei_Ayanami] #393935
02/08/12 15:41
02/08/12 15:41
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
You can use add_folder instead.


Always learn from history, to be sure you make the same mistakes again...
Re: #define PRAGMA_PATH for published game [Re: Toon] #393963
02/08/12 20:36
02/08/12 20:36
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
or add to file names always absolute paths containing the subfolder name like "images\\yourpicture.jpg". can be simple to use this approach if you store in strings your subfolders, and use:
str_cpy( actualfilename , foldername );
str_cat( actualfilename , filename );

this way the compilation will result also in a cd folder without subfolders, but if you copy/move the exe and the dlls to your script folder it will work fine (normally the exe is also placed to script folder).


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: #define PRAGMA_PATH for published game [Re: Uhrwerk] #394051
02/09/12 15:39
02/09/12 15:39
Joined: Nov 2003
Posts: 433
The Netherlands
T
Toon Offline OP
Senior Member
Toon  Offline OP
Senior Member
T

Joined: Nov 2003
Posts: 433
The Netherlands
Thanks for all the replies! laugh

How exactly do I use this function? I tried this but it does not work:

After the default.c include:
Code:
#define PRAGMA_PATH "images\\gui";



In top of the void main():
Code:
add_folder("images\\gui");



It does work when I run main.c but when I run the published version (.exe), the console reports the files not found...what am I missing here?

Re: #define PRAGMA_PATH for published game [Re: Toon] #394102
02/10/12 01:13
02/10/12 01:13
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Did you remember to copy those files over to the publishing directory?


Always learn from history, to be sure you make the same mistakes again...
Re: #define PRAGMA_PATH for published game [Re: Uhrwerk] #394121
02/10/12 11:59
02/10/12 11:59
Joined: Nov 2003
Posts: 433
The Netherlands
T
Toon Offline OP
Senior Member
Toon  Offline OP
Senior Member
T

Joined: Nov 2003
Posts: 433
The Netherlands
yep! smile

Re: #define PRAGMA_PATH for published game [Re: Toon] #394127
02/10/12 13:09
02/10/12 13:09
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Ok, then my only idea left is, that you could have called add_new() somewhere in your code.


Always learn from history, to be sure you make the same mistakes again...

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