Difference between revisions of "Advanced Said() Strings - Part 2 - Qualifying Adjectives"
From SCI Wiki
Jump to navigationJump to search (Created page with "'''By Gumby''' '''Qualifying adjectives:''' <div class="CodeBlockHeader">Code:</div> <syntaxhighlight lang="sci" class="cs">(if(Said('take/key<gold')) Print("Ahh! The...") |
|||
Line 4: | Line 4: | ||
<div class="CodeBlockHeader">Code:</div> | <div class="CodeBlockHeader">Code:</div> | ||
− | <syntaxhighlight lang="sci">(if(Said('take/key<gold')) | + | <syntaxhighlight lang="sci" class="cs">(if(Said('take/key<gold')) |
Print("Ahh! The gold key!") | Print("Ahh! The gold key!") | ||
) | ) |
Revision as of 04:06, 5 August 2013
By Gumby
Qualifying adjectives:
Code:
(if(Said('take/key<gold'))
Print("Ahh! The gold key!")
)
(if(Said('take/key<silver'))
Print("Ahh! The silver key!")
)
(if(Said('take/key'))
Print("Which key do you mean, the silver or the gold key?")
)
This example forces the user to use the correct adjective in order to pick up a key. If the user does not, it falls through to the last rule which tells the user that they must be more specific.