TEXT BOX Q.

Started by JJJAC55, Fri 01/04/2005 19:11:00

Previous topic - Next topic

JJJAC55

OK, how would I have an input box asking them a question, and then an if statement with the answer.

      string answer;
      InputBox("Buy L Coke?", answer);
      if (answer == ) {
        DisplaySpeech(ROGER, "I bought a Coke");
      }
      else {
        DisplaySpeech(ROGER, "I didnt bought a coke");
      }

strazer

You have to use StrComp or StrCaseComp to check strings:

Code: ags

 if (StrCaseComp(answer, "Yes") == 0) {


Check the manual.

SMF spam blocked by CleanTalk