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 / execute+dir

Author
Message
Lover of games
20
Years of Service
User Offline
Joined: 17th Apr 2005
Location:
Posted: 14th Aug 2006 08:57 Edited at: 14th Aug 2006 08:58
Ok, i'm practicing with directory making and I wanted to create a directory when the game executed. I tried to make a second .EXE to handle that but it didn't work plus is made the .EXE HUGE!!! what am u doing wrong?

here's the code for the program that's suppose to execute the file



could someone tell me what's going on?

EDIT: I also want it to create a directory like some games do. when u click on them, they create a folder. or even some normal programs.

"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 14th Aug 2006 12:27 Edited at: 14th Aug 2006 12:29
There doesn't seem to be anything wrong. Or it is the file 12.exe that contains the bug, or the exe simply doesn't exist in the folder of this exe.

If the problem is the last one, change the last parameter to the directory (relative or hard), or replace 12.exe in the correct folder.

[edit]

To make a directory automatically, most DB games use the 1-line-code:
if path exist(directory$) = 0 then make directory directory$

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Lover of games
20
Years of Service
User Offline
Joined: 17th Apr 2005
Location:
Posted: 14th Aug 2006 17:35
When i tried to do it again, it compiled small but i get this error: System error : Error 163. Failed to set cooperative level for directDraw. wtf is that?

"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack
coolgames
19
Years of Service
User Offline
Joined: 26th Sep 2005
Location: Oregon, USA
Posted: 14th Aug 2006 22:46
It means you can't run two db programs at once.

Lover of games
20
Years of Service
User Offline
Joined: 17th Apr 2005
Location:
Posted: 15th Aug 2006 03:19
I've figured out that if I put the code in the main .exe it works,

this is the code i used.



"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack
Captain America
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Here
Posted: 15th Aug 2006 04:10 Edited at: 15th Aug 2006 04:11
oops!

sorry wrong thread!




Cheers,
Capt. America
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 15th Aug 2006 15:04

It doesn't make much sense to me. I assume that 12.exe exists all the time since you use it. So practically, it should create the directory "saved" every time it starts?

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Lover of games
20
Years of Service
User Offline
Joined: 17th Apr 2005
Location:
Posted: 15th Aug 2006 22:46
I suppose it doesn't but I changed if to delete the directory if it exists. that's the only way i could do to make a directory when the program starts.

"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack

Login to post a reply

Server time is: 2025-05-25 06:12:30
Your offset time is: 2025-05-25 06:12:30