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.

Author
Message
Jojajojango
15
Years of Service
User Offline
Joined: 9th Jan 2011
Location:
Posted: 14th Jan 2011 22:12
this is stupid but.
i am trying to make my own text adventure
when i use "then" is it suppose to light up blue
cause mine dont.
every tutorial i watch it seems to show when they use it in there programs it lights up.
im using db pro

XXjangoXX
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 14th Jan 2011 23:21
Does it compile correctly? If it does, don't worry about it.

My signature is NOT a moderator plaything! Stop changing it!
Scraggle
Moderator
23
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 15th Jan 2011 00:03
The colouring of code is handled by the IDE that you are using. If you would like full control of what gets highlighted and to what colour then I would recommend Indigo. It is offered free of charge with the option to donate should you find it useful ... and you will find it useful.



C0wbox
20
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 15th Jan 2011 00:06
Codesurge has blue thens too. !

Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 15th Jan 2011 01:42
Early versions of the editor never had 'then' listed in the keywords file, you'll have to manually add this in yourself. To do that, navigate to the folder: C:\Program Files\Dark Basic Software\Dark Basic Professional\Editor\Keywords and open the keywords.ini file. Add this line wherever: THEN==

"Only the educated are free" ~Epictetus
"Imagination is more important than knowledge..." ~Einstein
C0wbox
20
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 15th Jan 2011 01:45
O yeah that's a point, I may have added mine in now that I think about it.

mr_d
DBPro Tool Maker
19
Years of Service
User Offline
Joined: 26th Mar 2007
Location: Somewhere In Australia
Posted: 15th Jan 2011 02:23
one thing to keep in mind though, that caused me a little problem for a little while, is that the "then" keyword should only be used if you have one statement following it.
i.e. it acts as if you had "endif" after the statement.
if you want/need multiple statements, don't use the "then" keyword at all. I found this strange myself as all other BASICs I've seen before would have the "then" keyword as mandatory for all "if" statements with manadatory "endif" statements as well. oh well.

(\___/)
(='.'=) Copy bunny into your signature to
("_(" help him gain world domination.
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 15th Jan 2011 18:43
yea endif is only needed if you're not using then. But you can have multiple statements and still use then:

if this = 1 then stuff=1:thing=2:why=3:insane=4:giveup=5

"Only the educated are free" ~Epictetus
"Imagination is more important than knowledge..." ~Einstein
Jojajojango
15
Years of Service
User Offline
Joined: 9th Jan 2011
Location:
Posted: 15th Jan 2011 22:52
lol thanks hahah i figured it out

XXjangoXX

Login to post a reply

Server time is: 2026-07-18 02:09:07
Your offset time is: 2026-07-18 02:09:07