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 / a very basic input problem that has made me go f***king mad :)

Author
Message
vivi
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 19th Feb 2003 19:24
ok here is the problem (and yes i have tried to solve it befor bring to the forum)




im trying to use the OR command but it doesnt work
Any help would be hot (-JarJar-Binks Star Wars Eps 1 :FM)
WHY WAIT FOR GAMES.......MAKE THEM COME TO YOU
>>>>www.sharksoft.scripterz.com<<<<<
THANKS IN ADVANCE
Witch Bomber
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: Scotland
Posted: 19th Feb 2003 19:39
Try


Those of you who think you know everything are annoying to those of us who do.
hexGEAR
21
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 19th Feb 2003 20:01
or try this:



same thing just change in syntax ^_^

your birth was a blessing, sent to live and die on earth as a lesson, we each have a star all you have to do is find it, once you do, everyone who sees it will be blinded - DMX
PiratSS
21
Years of Service
User Offline
Joined: 18th Oct 2002
Location:
Posted: 19th Feb 2003 20:12
anyway, your problem is when you use "and" ot "or" commands,

you should repeat your self: if a=1 and a=2 and a=3 or a=4 or a=4....

Dual Amd Athlon 2Ghz(1Ghz x 2), 40GB 15000 Rpm SCSI Hard Drive, 640 Mb 266Mhz DDR, 12x8x32 CDRW, ATI Rage Fury Pro 32Mb, 17' Monitor

Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 20th Feb 2003 01:16
SELECT a good command too:

John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 20th Feb 2003 04:39
input "put in a number from the list: 1,2,4,5,6 ", number

if number= 1 or number= 3 then print "hi"
if number= 4 or number =6 then print "hello"
if number= 2 or number =5 then print "hi'ya"
wait key

Works as well Try telling the OR statement what the OR is about

RPGamer

Current - RPG: Eternal Destiny
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
QuothTheRaven
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 20th Feb 2003 06:19
you see vivi, in your code

if number= 1 or 3 then print "hi"
if number= 4 or 6 then print "hello"
if number= 2 or 5 then print "hi'ya"

you check to see if 3 = 3. Or 3 is the same thing as saying
if 3
then
and the IF statement looks for a value greater than 0, and since 3 is greater than 0 it assumes all 3 inputs are true, and will print everything
vivi
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 23rd Feb 2003 17:24
Thanks for the explaination QuothTheRaven, RPGamer
witchbomber , PiratSS and for the alt Flashingblade


WHY WAIT FOR GAMES.......MAKE THEM COME TO YOU
>>>>www.sharksoft.scripterz.com<<<<<
THANKS IN ADVANCE
PiratSS
21
Years of Service
User Offline
Joined: 18th Oct 2002
Location:
Posted: 23rd Feb 2003 20:47
at least he spells my name right

Current Project:

Login to post a reply

Server time is: 2024-09-19 17:43:05
Your offset time is: 2024-09-19 17:43:05