Quote:
Originally Posted by Vorrox
I am having a problem, where I want to use a while loop to compare two strings, and move on to an if statement once the condition is met. The condition being that the string must equal either "Trick" or "Treat". Once it equals either of those, I want it to run an if statement to check which one was entered, and then respond accordingly. I apologize if this doesn't make much sense, I am very tired.
|
Try:
while stringVariable!="trick" and stringVariable!="treat"
{
Do nothing
}
if stringVariable =="trick"
{
//Insert methods
}
else
{
if stringVariable=="treat"
{
//Insert methods
}
}