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 / Issue with the EXE creator/player or maybe the code?

Author
Message
DrunkenAdvice
11
Years of Service
User Offline
Joined: 22nd Nov 2013
Location:
Posted: 25th Nov 2013 00:15
So, new issue.
I attempted to fix another problem, and when that just caused issues i reinstalled the program
But now, I have a new issue.
When i try and run the below program what i get is a flash of black on the screen like it ran but then it just goes back to my code.
No syntax errors are reported, nothing.
Just a flash and its over.
If i try and run something like

No problem, but the below just gives me a flash of black then ends.
Any ideas how to fix this?



(here is the code that refuses to run)


Winning an argument against a troll, whom must admit that you are correct. The creature then kills itself in complete shame. Everything in world is a lil better.
That's how finishing a code feels.
Mobiius
Valued Member
22
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 25th Nov 2013 10:31
Your constant declarations are wrong, remove the equals signs and they'll be correct.

You spelt Arial wrong on the font setup part.

Your UNTIL clause is always true, so the game ends immediately.

And that's all I can see after a quick glance at the code, and without running it.

Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 25th Nov 2013 14:41
Quote: "Your constant declarations are wrong, remove the equals signs and they'll be correct."


No, that should work fine.

With the Arial spelling corrected, all the "random"s changed to "randomm" (to avoid a conflict with the Matrix1 utilities which I have), and the \" pairs all changed to ", the code then works as I guess it should. I see a hangman diagram and various messages before the program ends.

I wonder whether you are using an old version of the editor which did strange things like this. For example, there was a version which ran the previous exe file and not the newly compiled one. If that's your problem the following steps will fix it temporarily: (1) save your project, (2) delete the exe file from the folder, (3) open your project and recompile and run your program - but make sure it's loaded the correct .dba file first otherwise you'll be back where you started.

To check which version DBPro thinks you are using, go into the DBPro editor and click on both Help/About Dark Basic Professional Editor and Help/Dark Basic Professional. What dates and version numbers do you see?



Powered by Free Banners
Mobiius
Valued Member
22
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 25th Nov 2013 16:15
Quote: "No, that should work fine."

Really? It doesn't compile to:
Set Display Mode = 800, = 600, 16

Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 25th Nov 2013 17:43
No.

Try this or better still try your own example.



and then try this:



The second doesn't compile (as it shouldn't). I guess the "=" is optional in the #constant definition.



Powered by Free Banners
Mobiius
Valued Member
22
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 25th Nov 2013 17:48
Huh, Weird?

Login to post a reply

Server time is: 2025-05-17 07:03:12
Your offset time is: 2025-05-17 07:03:12