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...

Author
Message
Mediamonster
13
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...
Silverman
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: France
Posted: 13th Nov 2010 20:25 Edited at: 13th Nov 2010 20:26
Hi,

for DBPro, you must post here:
http://forum.thegamecreators.com/?m=forum_read&i=1


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
Libervurto
17
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
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 15th Nov 2010 01:28
Also:
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 lines...it is made out of circles. That is why clocks are round!" -Caboose

Login to post a reply

Server time is: 2024-03-28 21:05:35
Your offset time is: 2024-03-28 21:05:35