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 / Hi could somebody please help me?

Author
Message
Death Stryke
20
Years of Service
User Offline
Joined: 19th Jun 2004
Location:
Posted: 20th Jun 2004 04:01 Edited at: 20th Jun 2004 04:03
Hi, what it is I'm tryign to do a text-based RPG before i try to do one with graphics and i need some help with a problem. I asked a simple yes/no question in the game and i done it so that if you answer with "Yes" it says something and if you answer it with anything else it says something different. Now because its case sensitive if somebody says "yes" without a capital Y it would say the other sentence. Please help because i've understood what i've done so far with passwords but this is really bugging me and ill end up kicking myself if i find its something easy. Also could anyone give me tips on the sort of things to include in text-based RPGs? Thanks to any replys.

---Deathstryke666---
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 20th Jun 2004 04:11
Suggest you use LOWER$ to convert typed answer into lowercase and then compare it to "yes". This means user can type YES, yes or Yes and get same answer


Boo!
Death Stryke
20
Years of Service
User Offline
Joined: 19th Jun 2004
Location:
Posted: 20th Jun 2004 04:24 Edited at: 20th Jun 2004 04:25
Sorry but i don't know understand what you just put when you said "compare it to yes". And i don't understand where you'd type in LOWER$. I know im a nuisance, i've given the code im using could you please alter it and include what you just said i should do? That would be a giant help. Thanks


---Deathstryke666---
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 20th Jun 2004 04:35
Simply change one line of you code to this



what this does is compare the lowercase version of what user types to string provided ("yes"). I have also added another comparison to just 'y'. This is in case someone types 'Y' or 'y' instead of 'yes' or 'YES' or even 'Yes'


Boo!
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 20th Jun 2004 04:37
PS It's now 1:39 in the morning and I'm falling asleep, so PC is going off now! I'll check this post in the morning but hopefully you can proceed with this info.


Boo!
Death Stryke
20
Years of Service
User Offline
Joined: 19th Jun 2004
Location:
Posted: 20th Jun 2004 04:41
Thanks so much that really helped. Quick responses on this site! I'm nearly falling asleep as well lol im determined to do some more of this though. Thanks again!

---Deathstryke666---
Troan
21
Years of Service
User Offline
Joined: 22nd Jan 2003
Location: Inner thought about nothing
Posted: 20th Jun 2004 04:50
your rpg could have a promblem someone could say like Yea or Sure but most importantly some1 could messup.



this code might help


All that glitters.. Even the stars. All things precious.. Even your life.
The King of Bandits can steal it all. In a blink of an eye.
Death Stryke
20
Years of Service
User Offline
Joined: 19th Jun 2004
Location:
Posted: 22nd Jun 2004 00:07
Thanks a lot ill try that

---Deathstryke666---

Login to post a reply

Server time is: 2024-09-22 14:34:10
Your offset time is: 2024-09-22 14:34:10