If Get Input Result = 1 or 2 or 3
brenden.winger
08 Jun 2017, 18:36Hello,
I'm new to the program, so this is probably a no brainer question, but I couldn't find the answer anywhere.
I just want to know how to have a list of possible responses that yield the same outcome.
I've tried | and , and \ and : none of which have worked.
The Pixie
08 Jun 2017, 18:47It is "and".
if (result = 1 and result = 2 and result = 3) {
brenden.winger
08 Jun 2017, 19:02Thank you for the suggestion---
It doesn't look like that's fixing it though...
It works for one when I say, result = "word"
but when I put result = "word" and result= "other word" it doesn't recognize it...
I tried without quotations and it doesn't work either
The Pixie
08 Jun 2017, 19:22Oops, I should have said "or"!
brenden.winger
08 Jun 2017, 21:58I think I got it to work = ) Thank you
hegemonkhan
08 Jun 2017, 22:20simple boolean (true/false) logic:
(binary logic: 0/1, is the same thing conceptually: 0:false/1:true)
(as we're just talking about dualism: two and only two choices/options: opposites, "black and white world", adversarial)
(another form of dualism is lawyers' questions to witnesses in court, in that they must answer them as/with: yes/no)
(another form of dualism is electronic charges: +:pos/-:neg)
(1:true:yes / 0:false:no --- or whatever, as we can represent two and only two choices in infinite ways)
if you buy me a diamond ring AND gold jewelry, you get to marry me:
if you buy her only a diamond ring (true and false), do you get to marry her? NO/FALSE
if you buy her only gold jewelry (true and false), do you get to marry her? NO/FALSE
if you her nothing (false and false), do you get to mary her? NO/FALSE
if you buy her both a diamond ring (true) AND gold jewerly (true), do you get to marry her? YES/TRUE
'AND' ('conjunction') Logic:
true and true = TRUE
true and false = FALSE
false and true = FALSE
false and false = FALSE
if you buy me a diamond ring OR gold jewelry, you get to marry me:
if you buy her only a diamond ring (true or false), do you get to marry her? YES/TRUE
if you buy her only gold jewelry (true or false), do you get to marry her? YES/TRUE
if you her nothing (false or false), do you get to mary her? NO/FALSE
if you buy her both a diamond ring (true) OR gold jewerly (true), do you get to marry her? YES/TRUE
'OR' ('disjunction') Logic:
true or true = TRUE
true or false = TRUE
false or true = TRUE
false or false = FALSE
NEGATION ('not'):
not true = FALSE
not false = TRUE
https://en.wikipedia.org/wiki/Boolean_algebra
http://philosophy.lander.edu/logic/symbolic.html
https://en.wikipedia.org/wiki/Logic_gate
http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/
http://www.electronics-tutorials.ws/logic/logic_1.html

Dcoder
08 Jun 2017, 23:31I've been using:
if result = 1 or if result = 2 or if result = 3
Didn't know you could slightly compact that with:
if (result = 1 or result = 2 or result = 3)
Saves on the "ifs". Learn something new every day from you guys!
hegemonkhan
09 Jun 2017, 01:38the 'if' is not the 'condition' in technical terms, see below:
the Script/Function (action/event/scripting): 'if ( /* expression */ ) { /* scripting */ }'
the Expression of/for the Script/Function: '(result = 1 or result = 2 or result = 3)'
the condition(s) of/for the Expression: 'result = 1', 'result = 2', and 'result = 3'
the logic operators of/for the conditions (and thus the Expression too): 'or', 'and', and/or 'not'
and I've learned from you, that we can do:
if result = 1 or if result = 2 or if result = 3
lol :D
The Pixie
09 Jun 2017, 06:45Dcoder, can you give an example of some code where that works? It does not look like it should!

Dcoder
09 Jun 2017, 17:48I see what you mean. I typed:
if result = 1 or if result = 2 or if result = 3
as a script command in the "expression" box, and Quest automatically converts it to:
if (result = 1 or result = 2 or result = 3)
in the code view without my input.