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 / sudden error messages when trying to run

Author
Message
mindsclay
14
Years of Service
User Offline
Joined: 1st May 2012
Location: Rocklin, CA, USA
Posted: 25th Feb 2013 22:13
Please see attachment for error message. This is just now appearing. No changes since last time I ran except that this is a different version of DBPro.

www.mindsclay.com
lucifermagus.mindsclay.com (not working with Firefox)
Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 25th Feb 2013 22:24
This is the most disgusting error around the official editor ever.

I've bounced into it countless times over the years, discussed it here with people, and nobody could say anything helpful.

Sometimes it simply goes away (?!), sometimes it comes up without warning... sometimes updates give me it... to put it short, i never really realized how i actually fixed the problem, i was too busy reinstalling and trying again with tears in my eyes, but once i guess using a different project folder helped! If you have this error when trying to compile outside Dark Basic's standard project folder, then make you project to be in there, and try again. If it is already there, try to run it outside the project folder.

-Mental Hybrid: A unique heavy story based shoot'em ~40% (primary project)
-CoreFleet: An underground commander unit based RTS (canned) ~15%
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 25th Feb 2013 23:09
Why are you still using the old editor? run EditorNew.exe but then again I do not know which version of DBP you have installed there...

Good Luck!...

luskos
19
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 26th Feb 2013 00:22
Just be sure you are using version up to date.http://www.thegamecreators.com/?m=view_product&id=2000

Coding is My Kung Fu!
And My Kung Fu is better than Yours!
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 28th Feb 2013 00:17
Stop using that editor, and use editornew.exe which comes with the newer versions.

I live for video games! (And beers, and football, and cars!)
See what I live for here: [url]http:\\www.TeamDefiant.co.uk[/url]
mindsclay
14
Years of Service
User Offline
Joined: 1st May 2012
Location: Rocklin, CA, USA
Posted: 2nd Mar 2013 19:04
You're right. That is the older version editor. It was on my laptop away from internet connection, so I tried to use it anyway.

Thanks for not calling me an idiot.

www.mindsclay.com
lucifermagus.mindsclay.com (not working with Firefox)
luckycharms
13
Years of Service
User Offline
Joined: 11th Mar 2013
Location:
Posted: 11th Mar 2013 23:15
I just got dbpro and i am tryin to make a game where the computer gets one chance to guess the number


the player is thinking of and it is not woring and i dont know why please give me any tips and explain what i did wrong so i can learn



PRINT "WHAT IS YOUR NAME?"
INPUT NAME$
CLS
PRINT "HELLO, ";NAME$
PRINT "DO YOU WANT TO PLAY A GAME"
WAIT KEY
INPUT ANS$
CLS
WHILE ANS$="NO"
PRINT "GOODBYE"
END
ENDWHILE
WHILE ANS$="YES"
PRINT "THINK OF A NUMBER, 1 THROUGH 10"
PRINT "PRESS ANY KEY TO START THE GAME"
WAIT KEY
ENDWHILE
"Gue$"=RND(9)+1
RANDOMIZE TIMER()
SELECT Gue$
PRINT "WHERE YOU THINKING OF ";Gue$
PRINT "YES OR NO"
WAIT KEY
INPUT A$
CLS
WHILE A$="YES"
PRINT "YOU ARE SO PREDICTABLE, ";NAME$
PRINT "PRESS ANY KEY TO END GAME"
WAIT KEY
END
ENDWHILE
WHILE A$="NO"
PRINT "MY CALCULATIONS MUST BE OFF"
PRINT "I'LL GET YOU NEXT TIME, ";NAME$
PRINT "PRESS ANY KEY TO END GAME"
WAIT KEY
END
ENDWHILE
KeithC
Senior Moderator
20
Years of Service
User Offline
Joined: 27th Oct 2005
Location: Michigan
Posted: 12th Mar 2013 04:38
@Lucky Charms: You only need to post once, you are on post restriction as a new poster. So it takes time to be approved.

-Keith

Mr Kohlenstoff
20
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 12th Mar 2013 11:22 Edited at: 12th Mar 2013 11:24
@LuckyCharms

First off, this doesn't really fit into this thread, does it?

Also, you should put your code into code-tags

[ code] ...your code here...[ /code] (without the spaces)


Now, you seem to use WHILE/ENDWHILE a lot even though IF/ELSE/ENDIF would be appropriate. WHILE is used for loops with a condition, IF-blocks are executed just once if the condition is true.
So the first part of your code should maybe look like this:



And the rest, I don't know.



...doesn't make much sense. I guess the correct solution would be gue = rnd(9)+1. Any variable ending with an '$' is automatically a string variable (i.e. text), but RND(9)+1 generates an integer (i.e. a number).
Afterwards there's a SELECT but no ENDSELECT anywere.

I guess a good start for you would be to write your program in pseudo-code, that is not as program code but in a more logical form, simply to make sure you get the structure and order of operations right. So your pseudo-code could look somewhat like this:



...which can then be translated to DBP-code rather easily:



(Although using 'goto' is certainly not the best idea, usually you'd use some kind of loop here instead, such as repeat..until or while..endwhile, or if you want to set a limit to how often the user can guess a number for..next).

Login to post a reply

Server time is: 2026-07-07 10:12:50
Your offset time is: 2026-07-07 10:12:50