Jump to content
  • 0

Conditional Input Checks


seethingword

Question

Is there a way to check if anything inputted into a box matches a global variable or not?

Β 

Like if i make a global variable, and have the string value set to "Test"

Then i make an input box and have it check whatever is entered into it to check if it matches what the value of the global variable is.
So if I put "test2" In it, it will say incorrect. But if I put "test" in it, it will say correct. And this input box does NOT change the variable.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
private void cmbVariable_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (rdoPlayerVariables.Checked)
            {
                UpdateMinMaxValues(
                    PlayerVariableBase.Get(PlayerVariableBase.IdFromList(cmbVariable.SelectedIndex)).Type
                );
            }
            else
            {
                UpdateMinMaxValues(
                    ServerVariableBase.Get(ServerVariableBase.IdFromList(cmbVariable.SelectedIndex)).Type
                );
            }
        }

Specifically to update this To not update but send a check to see if they are matching

Link to comment
Share on other sites

×
×
  • Create New...