Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Need Help Putting music in

Author
Message
May0naise
16
Years of Service
User Offline
Joined: 16th Nov 2008
Location: Lost in Time
Posted: 23rd Nov 2008 03:36
Well, I've been trying to make a program, just a simple one, where if you type in a number or the song name it will play the song. I've tried this:

But i get an error "Runtime Error 3502-Could not load music at line 1"
Am i doing this right? If im not can someone help, or give me an example.
*I have used search, but i couldn't find any tutorials on it.*

Be patient....everything takes time.
pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 23rd Nov 2008 07:14
MUSIC is .MIDI or .MP3.
SOUND is .WAV.
You must use an LOAD SOUND command.
May0naise
16
Years of Service
User Offline
Joined: 16th Nov 2008
Location: Lost in Time
Posted: 23rd Nov 2008 15:24
Thanks for the help, i got it to work. I feel like an idiot, i forgot to put


Yea..Not adding PLAY MUSIC made me feel a little dumb.

Be patient....everything takes time.
May0naise
16
Years of Service
User Offline
Joined: 16th Nov 2008
Location: Lost in Time
Posted: 24th Nov 2008 23:21
Is there another way to enter the file name? Like a shorter way?

Any help is appreciated

Be patient....everything takes time.
Guyra
19
Years of Service
User Offline
Joined: 10th Nov 2005
Location: Norway
Posted: 26th Nov 2008 10:41
If your game project's main directory is for example "c:\mygame\", place the music file in a subdirectory called "music"(or whatever you want to call it), so that the address for the subdirectory is "c:\mygame\music". Then you can load the file like this instead:



Having the whole address when loading a file should never be done. All game files should be placed in subdirectories of the main game project directory.

Cheers!
May0naise
16
Years of Service
User Offline
Joined: 16th Nov 2008
Location: Lost in Time
Posted: 28th Nov 2008 00:38
Thanks for the help =]

Be patient....everything takes time.

Login to post a reply

Server time is: 2024-11-25 14:25:32
Your offset time is: 2024-11-25 14:25:32