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.

Newcomers DBPro Corner / whats wrong with my code? DBP

Author
Message
Diablos
18
Years of Service
User Offline
Joined: 15th Oct 2005
Location: meh?
Posted: 13th Jan 2006 23:48
ive been messing around with the commands for manipulating text and stuff and i came across problem.

whats wrong with my code? it doesnt seem to want to know the 'end' command.



woohoo im starting to get the hang of this! i can now officially program text adventures.
Dark Lord
19
Years of Service
User Offline
Joined: 19th Aug 2005
Location: Australia
Posted: 14th Jan 2006 00:13 Edited at: 14th Jan 2006 00:17
Try this:
UFO
18
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 14th Jan 2006 00:17
you forgot an endif:




Hippopotomonstrosesquippedaliophobia-Fear of long words
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 14th Jan 2006 00:31
Diablos, that's why we indent our code. Just using one single space inside any kind of loop helps us see where the loop begins and ends.



And use blank lines to separate areas of your code and rem statements to remind yourself whats going on. Indenting, adding blank spaces, and rem statements will help you to quickly see what your code is doing and give you the ability to find bugs quickly too.


Diablos
18
Years of Service
User Offline
Joined: 15th Oct 2005
Location: meh?
Posted: 14th Jan 2006 18:53
thanks

woohoo im starting to get the hang of this! i can now officially program text adventures.

Login to post a reply

Server time is: 2024-09-24 13:22:25
Your offset time is: 2024-09-24 13:22:25