Hey everyone, I am trying to call a function from a script that basically gives 3 variables and returns 1 result. My function ("GetResult") is already written, it asks which mode (1-6), then goes into an if statement and asks if the user wants a random generated result or a fixed result. if isRand == 1, then random result is generated. if isRand == 2, then they are prompted to enter the Index number, then result is given.
This is all I have so far for an idea on how to call it from another function.
result = GetResult(Mode, isRand, Index);
So my main question is, how can I pull this off? I feel like I need to assign certain numbers to words, Like I can't use 1-6 for Mode, Since this script I am calling it from will be eventually attached to the GUI. I need to say which each mode is. Is this the best way to do this? I was thinking about putting this statment below in my GetResult function. What do you think? Thank you in advance!
if Mode == "AB"
elseif Mode == "CD" || "EF" || "GH"
elseif Mode == "IJ"
elseif Mode == "KL"