Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 08/26/26 22:38
Retrieve optimize() variables order (edited)
by NorbertSz. 08/25/26 13:24
Max Number of Strategies in /Strategy folder
by Martin_HH. 08/17/26 07:54
Pause button for evaluation shell?
by AndrewAMD. 08/13/26 17:16
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 08/10/26 12:46
phantom() not defined in indicators.c
by jcl. 08/07/26 11:45
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (Quad, TipmyPip), 6,391 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
riggi89, shuhari, KD1990, Student_64151, Koti
19230 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Creating a relative path #298400
11/14/09 18:19
11/14/09 18:19
Joined: Aug 2009
Posts: 19
D
Dominator Offline OP
Newbie
Dominator  Offline OP
Newbie
D

Joined: Aug 2009
Posts: 19
In the game I am making I have my script in a folder. I want to make a relative path that goes down one level to a background folder.

With the help in the manual I cant figure out how to make the path.

Re: Creating a relative path [Re: Dominator] #298423
11/14/09 22:01
11/14/09 22:01
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
#define PRAGMA_PATH "Sound";

Re: Creating a relative path [Re: Widi] #298445
11/15/09 03:27
11/15/09 03:27
Joined: Nov 2009
Posts: 34
S
Sepiantum Offline
Newbie
Sepiantum  Offline
Newbie
S

Joined: Nov 2009
Posts: 34
you could do something like this:

FILE* fp = file_open("folder\\another folder\\file.txt");

Or something along the lines of that. Just use the escape sequence \\ for a \ to define your path.

Re: Creating a relative path [Re: Sepiantum] #298545
11/15/09 22:26
11/15/09 22:26
Joined: Aug 2009
Posts: 19
D
Dominator Offline OP
Newbie
Dominator  Offline OP
Newbie
D

Joined: Aug 2009
Posts: 19
I want the whole folder to be there not just a single file.
I also tried the first way and it still couldn't find the image.

To clarify I want to create a path to go down one folder level from my main script.

Re: Creating a relative path [Re: Dominator] #298686
11/16/09 22:30
11/16/09 22:30
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

You could try

#define PRAGMA_PATH "..\\Models";


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: Creating a relative path [Re: Ottawa] #298952
11/19/09 16:54
11/19/09 16:54
Joined: Aug 2009
Posts: 19
D
Dominator Offline OP
Newbie
Dominator  Offline OP
Newbie
D

Joined: Aug 2009
Posts: 19
Yes, it worked to create it like that.

thank you for the help.


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

Gamestudio download | 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