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 / Some Menu Problems...

Years of Service
User Offline
Joined: 13th Nov 2010
Location: Ukraine
Posted: 13th Nov 2010 13:11
If recently downloaded DBPro and from the first second i found huge differences between real Basic and this one.

So the main problem for now is:

This doesnt work (Sprite Does not move...)

I also Tried:

but it says 'Command Out Of Place'...

I cant understand this syntax... ITS NOT BASIC/VISUAL BASIC syntax.
its a hybrid. and i cant find anything correct with If/ELSE structure repeat. I googled and looked through the forums. nothing found...

The only thing that worked is :

but as you can understand sprite wont move correctly only in this way..

So th main Question is wtf wrong with that If/Else struct...?

Life would be so simple, if we only had a source code...
Years of Service
User Offline
Joined: 18th Jan 2007
Location: France
Posted: 13th Nov 2010 20:25 Edited at: 13th Nov 2010 20:26

for DBPro, you must post here:

the solution to your problem:


AMD Athlon(tm)XP 3200+ (2.2GHz) / DDR pc3200 (3x1024Mo) / Nvidia 6800GT (driver 197.45 WHQL)/ XP Pro SP3 / DirectX 9.0c (February 2010)/ DBClassic v1.2 / DBPro v7.4
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 14th Nov 2010 07:14
Welcome Mediamonster,

In DB you cannot have multiple comparisons of one variable like in your code where mousex() is compared twice.
if 0 > mousex() < 256 then sprite 9998,0,506,9998
The correct way to do this in DB would be
if 0 > mousex() and mousex() < 256 then sprite 9998,0,506,9998

Do oranges know what colour they are?
BN2 Productions
Years of Service
User Offline
Joined: 22nd Jan 2004
Posted: 15th Nov 2010 01:28
THEN is not used in DarkBASIC for the most part.

This is valid:

This is not:

Just take out the THEN command when doing it in blocks like so:

Great Quote:
"Time...LINE??? Time isn't made out of is made out of circles. That is why clocks are round!" -Caboose

Login to post a reply

Server time is: 2020-08-12 02:39:16
Your offset time is: 2020-08-12 02:39:16