Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
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
1 registered members (AndrewAMD), 645 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
PRAGMA_PATH problem #283358
08/07/09 11:38
08/07/09 11:38
Joined: Mar 2009
Posts: 276
Cebu City, Philippines
boyax Offline OP
Member
boyax  Offline OP
Member

Joined: Mar 2009
Posts: 276
Cebu City, Philippines
Hi,

me again... crazy

I just need some advise with the PRAGMA_PATH.
The working directory is set-up like:
note: work and sounds are folders.
Quote:

Work (folder)
|- Sounds (folder), soundfile.c


So, in my code set-up (soundfile.c):
Code:
#include <acknex.h>
#include <default.c>

#define PRAGMA_PATH "sounds";

char* music_level1 = "sndLvl1.mp3";

function main()
{
  video_mode = 8;	
  level_load(NULL);
  wait(2);
	
  media_loop(music_level1, NULL, 100);
}



But.. the code above doesn't work! I could not hear the sounds..could be the engine didn't find the mp3 file.

As I've done trial/experimentation, I've found out the fix is to change the definition of the "music_level1"
Code:
char* music_level1 = "sndLvl1.mp3";

change to

char* music_level1 = "sounds\\sndLvl1.mp3";



So, I'm wondering why PRAGMA_PATH didn't work with the first definiiton??? but even for the second definition not specifying the PRAGMA_PATH, the sound works.

Hope someone could advise. Thanks

Re: PRAGMA_PATH problem [Re: boyax] #283361
08/07/09 12:08
08/07/09 12:08
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
All is fine with your define.
Check the manual, media_xxx functions ONLY check for files in the game folder.
No paths checked, no resource-files checked either...
It will only work, as youve seen, by giving it the exact path when its not in the game folder...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: PRAGMA_PATH problem [Re: EvilSOB] #283367
08/07/09 12:52
08/07/09 12:52
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

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

This formula works for me

#define PRAGMA_PATH "..\\Sounds";


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: PRAGMA_PATH problem [Re: Ottawa] #283368
08/07/09 12:54
08/07/09 12:54
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Yeah, but not for scripts wink

Re: PRAGMA_PATH problem [Re: Rei_Ayanami] #283377
08/07/09 13:35
08/07/09 13:35
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

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

Did you try ?

STRING* music_level1 = "sndLvl1.mp3";


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: PRAGMA_PATH problem [Re: Rei_Ayanami] #283541
08/08/09 11:10
08/08/09 11:10
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
Originally Posted By: Rei_Ayanami
Yeah, but not for scripts wink

scripts/code CAN be in seperate folders

the initial script attached in WED must be in the same folder as the .wmp file, but any additional code can be in anywhere it's wanted...

Re: PRAGMA_PATH problem [Re: MrGuest] #283546
08/08/09 11:20
08/08/09 11:20
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
yes but when you want to add a sript from another folder in lite-c you must put the folder in the script include

Code:
#include "scripts\\yourscript.c"



Re: PRAGMA_PATH problem [Re: Rei_Ayanami] #283552
08/08/09 11:36
08/08/09 11:36
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
i don't have that problem

#PRAGMA_PATH "code"

works fine for me

even ".." for parent folders

Re: PRAGMA_PATH problem [Re: MrGuest] #283555
08/08/09 11:40
08/08/09 11:40
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
wOOOt?

It only says: yourfile.c not found frown for me

Re: PRAGMA_PATH problem [Re: Rei_Ayanami] #283559
08/08/09 12:03
08/08/09 12:03
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
hmmm... make sure filename is in quotes

#INCLUDE <> //for include folder
#INCLUDE "" //for sub folder(s)


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