2014-12-26 05:04:54 (edited by Lucas1 2014-12-26 05:06:57)

Hi,
So I am using the common_dialogs include made by someone on the blastbay forum which allows you t use open and save dialogs in bgt, but my code never runs. I will post a bit of my code, the actual code will bbe used for an application and it's rather long.
if(key_pressed(KEY_SPACE))
{
dlgsetup();
playfile.load(f);
}
void dlgsetup()
{
dlg.set_title("Open file");
dlg.set_path(DIRECTORY_MY_DOCUMENTS);
dlg.set_pattern("All files|*.wav;*.mp3;.*ogg|mp3 files|*.mp3|wav files|*.wav|ogg files|*.ogg",1);
dlg.set_type(SAVE_DIALOG);
f=dlg.show();
}
Can someone help me?
And by it won't run I mean bgt.exe it just stops responding when I run the program.

2014-12-26 07:33:26

Hi,
This include was made illegally as it uses the PureBASIC dialog functions. The PureBASIC license clearly states the following:

All components, libraries, and binaries are copyrighted by Fantaisie Software. The PureBasic license explicitly forbids the creation of DLLs whose primary function is to serve as a 'wrapper' for PureBasic functions.

Please delete this include as soon as you can, and find a different wrapper around the windows API, perhaps.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2014-12-26 13:28:46

Well, audiogames.net fan, it would help if that include actually used bgt code. As it stands, those functions aren't actually part of the bgt engine, so it's not wonder bgtgets annoyed at you.

I like to sleep, Sleep is good,
This is how I do it: Lie on a nice warm cozy bed, and dream dreams about how to rule the world!
Follow @TheGreatAthlon5 on twitter for humorous facts and game updates!
If you like my posts, thumb me up!

2014-12-26 15:28:41 (edited by Lucas1 2014-12-26 15:29:45)

@ethin, as far as I can tell there are no other wrappers for open and save dialogs. I didn't know that wasn't leagle so I'll take out those functions after I finish this post. if anyone has any other wrappers for dialogs like open, save, etc for bgt that would be great.