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 / Help with my code

Author
Message
vivi
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 9th Jan 2003 00:11
Here is the code
Rem Project: First game
Rem Created: 1/8/2003 9:25:13 PM

Rem ***** Main Source File *****
rem small text game with multiple endings
hide mouse

rem Players input saved as variables
INPUT "What is your name? ",name$
Input "How old are you? ",age$
Input "Are you GOOD person or EVIL? ",type$
Input "Would you give all you money to dogs?.....YES or NO ",money$
Input "Name your lucky number? ",l_n

rem the first two i can just say print
print "Your name is ",name$
wait key
print "You are ",age$
wait key

rem I set the multiple endings by IF statments
rem good or evil
IF type$="EVIL" then print " YOUR EVIL!!! ",v1$
wait key
IF type$="GOOD" then print " NICE GUY....WHY. ",v2$
wait key

rem money to dogs
IF money$="YES" then print " GOOD FOR YOU ",v3$
wait key
IF money$="NO" then print " WHATS WRONG WITH DOGS ",v4$
wait key

rem lucky number
print "So your lucky number is ",l_n
IF l_n>10 then print " WHY THAT LUCKY NUMBER? ",v5$
wait key
IF l_n
WHY WAIT FOR GAMES.......MAKE THEM COME TO YOU
>>>>www.sharksoft.scripterz.com<<<<<
THANKS IN ADVANCE
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 9th Jan 2003 04:06
READ THE POST AT THE TOP OF THIS SECTION

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
vivi
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 9th Jan 2003 20:41
Newcomers Corner
"New to DBPro or perhaps even programming? Fear not there are people on-hand to help you out! Post your questions here and share your knowledge."
WELL IM NEW AND I NEED HELP WITH A NOOBY QUESTION

where the else is it ment to go.
***********************************************************
I cant put it under the CODE heading because it is a question.....NOT am example.
SO I PUT IT HERE......please can you help or not

WHY WAIT FOR GAMES.......MAKE THEM COME TO YOU
>>>>www.sharksoft.scripterz.com<<<<<
THANKS IN ADVANCE
vivi
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 9th Jan 2003 20:45
Kentaree
--------------------------------------------------------------------------------
User

Joined: Sat Oct 5th 2002
Location: Ireland Posted: 6th Jan 2003 3:31 am
--------------------------------------------------------------------------------

39) When you have problems with a piece of code and ask about it on the forum, include a snippet! This makes it far easier to understand and fix the problem.


Whatever I did I didn't do it!

See even this guy thinks so....Its in the top post in this forum

WHY WAIT FOR GAMES.......MAKE THEM COME TO YOU
>>>>www.sharksoft.scripterz.com<<<<<
THANKS IN ADVANCE
vivi
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 9th Jan 2003 20:46


WHY WAIT FOR GAMES.......MAKE THEM COME TO YOU
>>>>www.sharksoft.scripterz.com<<<<<
THANKS IN ADVANCE
vivi
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 9th Jan 2003 20:48
OW SHIT......im so sorry.
What i was ment to say is
Could you help me with this code. It doesnt work.
Also saying that not all of it is there.........
I am sorry. . (I am such an ass).
Here is the full code

WHY WAIT FOR GAMES.......MAKE THEM COME TO YOU
>>>>www.sharksoft.scripterz.com<<<<<
THANKS IN ADVANCE
vivi
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 9th Jan 2003 20:48


WHY WAIT FOR GAMES.......MAKE THEM COME TO YOU
>>>>www.sharksoft.scripterz.com<<<<<
THANKS IN ADVANCE
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 9th Jan 2003 22:34
No Im the one to say sorry- I was in the code snippets board and I thought I still was. SO SORRY MAN!! Ill help ya if I can when I get back home.

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
vivi
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 10th Jan 2003 12:19
NP.....Thanks

WHY WAIT FOR GAMES.......MAKE THEM COME TO YOU
>>>>www.sharksoft.scripterz.com<<<<<
THANKS IN ADVANCE
Boegiboe
21
Years of Service
User Offline
Joined: 9th Dec 2002
Location: United Kingdom
Posted: 10th Jan 2003 17:03
I haven't seen this done before:

If v1$+v3$+v5$ then

that is probably the problem with the code. Also, not all possible outcomes have an ending, and if someone answers a question with an answer not on the list (eg. good or evil? they might put neutral), then this is not accounted for either....have fixed these problems for you.

If we could strike, I guarantee you there would be martial law.
Boegiboe
21
Years of Service
User Offline
Joined: 9th Dec 2002
Location: United Kingdom
Posted: 10th Jan 2003 17:03
Rem Project: First game
Rem Created: 1/8/2003 9:25:13 PM

Rem ***** Main Source File *****
rem small text game with multiple endings


rem Players input saved as variables
INPUT "What is your name? ",name$
Input "How old are you? ",age$
Input "Are you GOOD person or EVIL? ",type$
Input "Would you give all you money to dogs?.....YES or NO ",money$
Input "Name your lucky number? ",l_n

rem the first two i can just say print
print "Your name is ",name$
print "You are ",age$

rem I set the multiple endings by IF statments
rem good or evil
a=0:b=0:c=0
SELECT upper$(type$)
CASE "EVIL"
print " YOU'RE EVIL!!! "
a=1
ENDCASE
CASE "GOOD"
print " NICE GUY....WHY. "
a=2
ENDCASE
CASE DEFAULT
type$="NONE"
a=0
ENDCASE
ENDSELECT

rem money to dogs

SELECT upper$(money$)
CASE "YES"
print " GOOD FOR YOU "
b=3
ENDCASE
CASE "NO"
print " WHATS WRONG WITH DOGS "
b=4
ENDCASE
CASE DEFAULT
type$="NONE"
ENDCASE
ENDSELECT

rem lucky number
print "So your lucky number is ",l_n
IF l_n>10 then print " WHY THAT LUCKY NUMBER? ":c=5
IF l_n<=10 then print " HA.....WITH THAT! You must be a realy unlucky person? ":c=6

rem ======================================================================
rem OKay so its all set all i got to do is make is so the var do something
rem =======================================================================
Print "YOUR ENDING ",name$
If a=1 and b=3 and c=5
print "Your EVIL and I like it, you need a new number though"
wait key
end
endif
If a=1 and b=4 and c=6
print "Your EVIL and you need to respect dogs more numbers fine though"
wait key
end
endif
If a=2 and b=3 and c=5
print "Your GOOD and I like it, you need a new number though"
wait key
end
endif
If a=2 and b=4 and c=6
print "Your GOOD and you need to respect dogs more numbers fine though"
wait key
end
endif

print "You either answered a question wrong, or there is no ending for this permutation"
wait key
end

If we could strike, I guarantee you there would be martial law.
vivi
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 10th Jan 2003 20:52
Thanks Boegiboe.

WHY WAIT FOR GAMES.......MAKE THEM COME TO YOU
>>>>www.sharksoft.scripterz.com<<<<<
THANKS IN ADVANCE

Login to post a reply

Server time is: 2024-11-23 22:02:26
Your offset time is: 2024-11-23 22:02:26