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.

DarkBASIC Discussion / Can't get file access commands to work right

Author
Message
Xander
22
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 14th Dec 2004 23:31 Edited at: 14th Dec 2004 23:47
I am putting in a feature in my game so that people can drop an mp3 file into the music folder in the game so they can have whatever music they want during the game. I think this is the best way to do it, but I just can't get it working at all; it keeps giving me an unrelated error further down the program. However, if I rem out the file loading stuff, it works!

Here is the relevant part of my code:


If I leave it all 'unremed' then it gives me an 'object does not exists' error at the line where it says 'texture object a,10:scale object a,7,7,7...'. However, if I rem out all the file finding and music loading stuff, then it works fine! I just don't get it, has anyone had a problem similar to this before? There are 4 mp3s in the "DataMusic" folder, and they all work.


EDIT: Well, it was bound to happen. As soon as I give in and decide to post my question, I figure it out. I need to use the 'set dir' command again after finding files, before I load the music. But that brings up another question: How do I access the parent directory of the current directory?

EDIT #2: Well, it was bound to happen again. I figured out my last question; I will just store the current directory in a string before I change directories, then I can switch back to the original...

Xander Moser - Bolt Software - Firewall
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 17th Dec 2004 04:04
Haha, glad you worked it out Bolt

However, if you have a directory structure like so;


Then, you can do;


Jess.


Team EOD :: Programmer/All-Round Nice Guy
Aust. Convention!

Login to post a reply

Server time is: 2025-05-24 07:31:54
Your offset time is: 2025-05-24 07:31:54