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 Professional Discussion / Append in stand-alone

Author
Message
Benjames8
16
Years of Service
User Offline
Joined: 6th Jan 2010
Location: Your Nightmares
Posted: 19th Apr 2010 05:06
I am finishing up my first complete game with dbpro. When I try to play the game in stand-alone media mode it gives me an error " cannot append object at line blah blah blah." Any ideas one what is going on? I got all my media files and it works fine playing strait out of dbpro.
Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 19th Apr 2010 10:14 Edited at: 19th Apr 2010 10:14
The startup directory is probably wrong.
Try putting set dir left$(appname$(), lengthOfProgramName) at the beginning of your program.
Alternatively print out the result of get dir$() to see if it's the same when run directly from the IDE respective from Windows.

TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 19th Apr 2010 17:49
What is on line blah blah blah?

If it's a line with a path and filename on it, rem it out put in a print line to display what path and filename is on that line and a Wait Key - so you know exactly what it is that DB is actually trying to load.

The chances are you are not using relative paths and when the exe is compiled with the media, the filename doesn't exist anymore at that original location.

For this reason, you should avoid loading media from locations like My Documents for example. Move them into a Media folder inside your project directory instead. Then, everything is loaded from there using, 'Media\Filename'.

TDK

Login to post a reply

Server time is: 2026-07-26 07:36:17
Your offset time is: 2026-07-26 07:36:17