Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- OldWordA = false; // Setting up answer variable
- global.OldWordQ = "";
- repeat 3 // Run loop while answer is wrong and it has been repeated less than 3 times
- {
- global.OldWordQ = get_string("What word was replaced?", ""); // Getting user input with question and no prompt
- if string_lower(global.OldWordQ) == string_lower(global.DelWord) // Checking that input equals deleted word (string_lower stops capitalisation effects the result
- {
- OldWordA = true; // Setting correct answer variable to true to stop the loop and to allow it to be checked later
- break;
- }
- }
- NewWordA = false;
- globalvar NewWordA;
- repeat 3
- {
- global.NewWordQ = get_string("What word is new?", "");
- if string_lower(global.NewWordQ) == string_lower(global.WildCard)
- {
- NewWordA = true;
- break;
- }
- }
- if NewWordA and OldWordA // Checking if both questions are correct
- global.Win = true; // Setting win variable to true if questions are right
- else
- global.Win = false; // If either/both are wrong then set win to false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement