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 / im new please help me

Author
Message
Milky the purple crab
19
Years of Service
User Offline
Joined: 5th Aug 2005
Location:
Posted: 19th Aug 2005 10:09 Edited at: 19th Aug 2005 10:55
thanks for the help everyone

I don't fear pain.....I fear feeling it.
Milky the purple crab
19
Years of Service
User Offline
Joined: 5th Aug 2005
Location:
Posted: 19th Aug 2005 12:51
i have started a text adventure game
i have never done this before.



please help me i am trying to make it if the player inputs N that the code skips to scene1a.

I don't fear pain.....I fear feeling it.
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 19th Aug 2005 15:28 Edited at: 19th Aug 2005 15:31
Here:



The problems:

you aks the player to input "Y" or "N". But the variable y can only contain an integer value. So you have to change it to y$.

has to be


Second, you compare it to a variable. Not a piece of text. So Y has to be "Y".

not


Third: just for completiness, I changed the select y$ to select upper$(y$). Because it is possible that the player will input a lower "y".


becomes


That's all. Good luck.

Immunity and Annihalation makes Immunihalation...
Milky the purple crab
19
Years of Service
User Offline
Joined: 5th Aug 2005
Location:
Posted: 20th Aug 2005 07:38 Edited at: 20th Aug 2005 08:57
thanks alot

i finished it its a bit messy and i have to change it a bit but its finished



any hints on how to clean it up?

I don't fear pain.....I fear feeling it.
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 20th Aug 2005 11:13
When you get input you can change it to higher case so you only check for highercase strings.



If you don't really want to see the text output you can use inkey$(). It has to be in a loop though... inkey$() checks for keys when it sees that line and instantly goes to the next line. You don't have to use different strings for each input either (no a1$, a2$, a3$... all can be a$ or whatever you want).



One of the most important things you need to learn is spacing your code. See how the above snip has the "do" to the far left and the next command under that is one space over " a$=inkey$()". When you nest properly everything should line up. Sven B uses tabs to space code which is just as good. It just depends on your preference. But spaced out code is much, much easier to read... especially when you go back to it months or even years later.

And I hate to nitpick too but "cannibal monkeys" eat other monkeys... not humans.
Milky the purple crab
19
Years of Service
User Offline
Joined: 5th Aug 2005
Location:
Posted: 21st Aug 2005 02:22
thanks grog.
the cannibal monkeys were ummmmm angry because the maiden didn't want to have any monkey legs

I don't fear pain.....I fear feeling it.
Milky the purple crab
19
Years of Service
User Offline
Joined: 5th Aug 2005
Location:
Posted: 24th Aug 2005 10:07 Edited at: 24th Aug 2005 10:17
REMOVED POST

I don't fear pain.....I fear feeling it.
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 26th Aug 2005 07:35
Quote: "thanks grog.
the cannibal monkeys were ummmmm angry because the maiden didn't want to have any monkey legs "


Oh it makes sense now.

(sorry I didn't reply right away... i've been playing Dungeon Siege 2)

Login to post a reply

Server time is: 2024-11-27 20:39:34
Your offset time is: 2024-11-27 20:39:34