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 / Runtime Error

Author
Message
D a r k
20
Years of Service
User Offline
Joined: 21st Jun 2004
Location: In ur fridge, eatin ur foodz.
Posted: 27th Aug 2007 02:41
I created a standalone executable for my program, however. When I try to run the .exe I get:

"Error In program"
"Runtime Error: 136"

What does that mean? How can I fix this?
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 27th Aug 2007 06:25
Runtime Error 136 is "Path does not exist".

Are you placing all media in your project folder and using Build Final?

TDK_Man

D a r k
20
Years of Service
User Offline
Joined: 21st Jun 2004
Location: In ur fridge, eatin ur foodz.
Posted: 29th Aug 2007 06:50
Ehh... I though a standalone Executable was ... well a standalone kinda thing. As in, my media is build into it.

So what types of media will I have to have with my standalone Executable?
Insert Name Here
18
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 29th Aug 2007 12:42 Edited at: 29th Aug 2007 22:49
If it's a FINAL EXE then all of the media is attatched to it. If it is just a normal EXE then you'll need all of the media that you use in theame inhte same folder. You'll also need to have no paths like C/Program files etc, because DB will choke on that as theremay not be those folders in any other computer you may put it on.

Acording to Grandma, I am now enemy of the evil republic, who captured Paris Hilton and couldn't manage it.
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 29th Aug 2007 16:15
Also, if you have a final, make sure all your files have unique names, even if they are in different folders.

Your signature has been erased by a mod because it was rubbish.
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 29th Aug 2007 22:23 Edited at: 29th Aug 2007 22:32
INH & OBese87:

You may be confusing the guy a little here...

Quote: "You'll also need to have n paths like C/Program files etc, because DB will choke on that as theremay not be those folders in any other computer you may put it on."


Actually, you only need to use relative paths for media - or preferably none at all.

OK, an example...

Say you have MyGame.DBA which loads files called Image1.bmp, Image2.bmp and Image3.bmp. Let's also say you have the DBA file in the folder:

C: \Programming\DBProjects\MyGame

If you place those images in a folder within the MyGame directory called Images they would be in:

C: \Programming\DBProjects\MyGame\Images

(Space intentionally included to prevent smiley).

In the DBA source code you use a relative path when loading these images. For example, you would use:

Load Image "Images\Image1.bmp",1

Not

Load Image "C: \Programming\DBProjects\MyGame\Images\Image1.bmp",1

As the Images folder is in the same directory as the DBA file, you don't need to enter the C: \Programming\DBProjects\MyGame part.

Which means that a Build Final exe won't be looking for that full path on other people's machines - only the Images folder.

Quote: "make sure all your files have unique names, even if they are in different folders."


If they are in different folders then they are uniquely named. As such, you can have five files all called Image1.bmp and as long as they are in different folders everything will be fine.

[Edit] Doh! After writing all this, re-reading INH's post I've just realised that there's a missing letter 'o' where it mattered. (There's an o in no)!

Guys - Please proof read your posts before hitting the submit button, or read them after and use the edit button!

TDK_Man

Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 29th Aug 2007 22:55
@TDK
I swear I have had problems with Final EXEs regarding file names, it may have been some other problem but I'm pretty sure it was because files in different folders had the same name.

Your signature has been erased by a mod because it was rubbish.

Login to post a reply

Server time is: 2025-06-02 06:25:32
Your offset time is: 2025-06-02 06:25:32