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 / Bugs or something else?

Author
Message
Rasta
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location:
Posted: 27th Feb 2003 23:06
Hello. I had a game that ran fine on DB1, but seems to fall over in DB Pro on the simplest of things. i.e.:
cli$ = right$(stack$(choice), 5) + ", accelerate to " + str$(new_speed#(choice)) + "kts. Over."
...returns an error "Parameter for right$ do not match..." Yet they do!

Changing it to:
a$ = stack$(choice)
cli$ = right$(a$, 5) + ", accelerate to " + str$(new_speed#(choice)) + "kts. Over."
...solves the problem, but why can DB1 handle the first version and DB Pro can't?

Likewise the snippet:
if (key => 49) and (key
Rasta
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location:
Posted: 27th Feb 2003 23:10
[lessthanorequalto] 51)
spd$ = chr$(key)
cli$ = cli$ + chr$(key)
mode = 8
endif
...gives a "command out of place" error. "Rem"ing the "endif" makes this problem go away, but...surely not?!

Any suggestions greatly appreciated, I'd rather not have to start from scratch! :o) Thanks.

(Blimey, even the forum can't hold code!) ;o)))

Easily Confused
23
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 27th Feb 2003 23:27
That's strange, because your first problem doesn't create any problems this end:



And your second problem compiles OK for me as well.

Are you using the demo of DBPro or have you not yet upgraded to patch 3.1? Either case could be significant.

Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.
Rasta
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location:
Posted: 28th Feb 2003 00:29
Full version, and pep, I downloaded 3.1 to see if that fixed.

Second problem has gone - something to do with remarks:

` A remark here
if the_cows_come_home
do_something
endif

...causes the error. Changing it to:

` A remark here

if the_cows_come_home
do_something
endif

...fixes it.

Thanks for trying it anyway. I'll keep on looking to see if there's some other wierd combination I'm using that stuffs it all up.

Login to post a reply

Server time is: 2026-07-17 02:59:06
Your offset time is: 2026-07-17 02:59:06