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 / Problem: OPEN FILE DIALOG

Author
Message
Screen
15
Years of Service
User Offline
Joined: 24th Sep 2010
Location:
Posted: 6th Jun 2011 22:25
I just installed Dark Lights expansion to DBPro. Now I tried to compile & run the LightmapperIDE, but I get an error:

Compilation Failed. Could not determine parameter type of 'OPEN FILE DIALOG( root$+"\MyScenes\","*.dbo;*.x", "Load a model to lightmap" )' at line 401.

The code in question goes like this:


What's the problem?
Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 7th Jun 2011 02:06
I'd guess that the compiler interprets \" as the character ' " ' (quotation). Change your \s to /s and it might work?

in many programming languages,to get the exact string:
\MyScenes\

you would type in
"\\MyScenes\\"

and to get the exact string:
abcd""'foo

you would type in:
"abcd\"\"\'foo"

google "escape characters" for more info.


Tell me if there's a broken link to images in a thread I post, and I'll fix 'em.
Screen
15
Years of Service
User Offline
Joined: 24th Sep 2010
Location:
Posted: 7th Jun 2011 02:34 Edited at: 7th Jun 2011 05:46
Okay, I will try to change those characters. Will report back.

EDIT:
I think the problem lies in the 'FILE DIALOG'-commands themselves. They are not highlighted blue in my editor. Am I missing some files needed for these commands to be recognized by DBPro?
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 7th Jun 2011 14:33 Edited at: 7th Jun 2011 14:33
Here is the code from an "Open file Dialog" dba I use written by the eminent @Green Gandalf. It also contains an example.



Screen
15
Years of Service
User Offline
Joined: 24th Sep 2010
Location:
Posted: 8th Jun 2011 02:34
So I need a .dba to run the lightmap editor?

I just want it to run simple. If I need that bunch of code then can I get some help using it?
Rich Dersheimer
AGK Developer
17
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 8th Jun 2011 04:22 Edited at: 8th Jun 2011 04:35
Screen - I just tried Dark Lights, and the OPEN FILE DIALOG works just fine for me in the Lightmapper exe. The program crashes when I try to save my lightmap, so I won't be using it for anything, I guess.

Trying to compile the project fails. However, it did give a more explicit error message...



This indicates that the OPEN FILE DIALOG call requires only two parameters. Removing that third parameter clears the error. You must also remove the third parameter from the SAVE FILE DIALOG call at line 439.

DO NOT COMPILE THE PROGRAM!

Compiling will overwrite your exe file with one that does not start up. USkin.dll is missing, so you will not be able to run the exe without it.

Anyway, the OPEN and SAVE calls only want 2 parameters, so that's what's going on there.

EDIT - also, there is an include file load that is commented out, but the include still gets loaded. I think that's a bug with DBPro and having an include command in a comment.

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Jun 2011 10:23 Edited at: 8th Jun 2011 10:25
Quote: "So I need a .dba to run the lightmap editor?

I just want it to run simple. If I need that bunch of code then can I get some help using it?"

The code I posted was just a possible replacement for that command and I thought even if you didn't use it someone else might find it helpful.

You can use it by just taking the code and dumping it at the bottom of your code somewhere after your game loop then use something like this in your code to load a file:


Screen
15
Years of Service
User Offline
Joined: 24th Sep 2010
Location:
Posted: 9th Jun 2011 10:25
I tried, but now I got to something like Im missing some DLL's. I think it's a dead end.

Why cant I get a working Dark Lights editor as it is?? I just want to use it for lightmapping... I shouldnt need to write custom code to get it work, because that code was not written by me and it is hard to modify it, because it is not familiar.
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Jun 2011 10:32
Not sure what to suggest. What error exactly did you get?

I would probably reinstall DarkLights and not compile the editor as it will overwrite the existing executable. Just use the editor as it comes when you install DL.

Screen
15
Years of Service
User Offline
Joined: 24th Sep 2010
Location:
Posted: 9th Jun 2011 10:50 Edited at: 9th Jun 2011 11:05
Okay, I'll try installing again. I got an error from the user32 dll. Probably many other errors too. It's easier for me to get it work by reinstalling. Thanks.

EDIT:
Ok, so I reinstalled Dark Lights and tried to run the executable for LightmapperIDE. I got an error:
"MFC71.DLL is missing"

What is this dll and where can I get it?
The Slayer
Forum Vice President
16
Years of Service
User Offline
Joined: 9th Nov 2009
Playing: (Hide and) Seek and Destroy on my guitar!
Posted: 9th Jun 2011 13:11
Quote: "What is this dll and where can I get it?"

It appears to be a module that contains the "Microsoft Foundation Classes (MFC)" that is used by "Microsoft Visual Studio .NET 2003" and other applications.

You can find the .dll HERE.

Cheers

RULES, MAN! YEAH, SLAYER!!

Login to post a reply

Server time is: 2026-07-10 17:39:13
Your offset time is: 2026-07-10 17:39:13