catventure Admin Adventurer
Number of posts : 410 Age : 72 Location : UK Humor : Enjoys a laugh! Adventure Points : 77 Registration date : 2008-06-08
| Subject: TAB Coding Extension: "else" Thu Jul 17, 2008 5:30 pm | |
| Hi,
I'm pleased to announce ACTION command #else# is back for next release !
Example RESPONSE usage format: [start]words conditions#condition#condition[acts]action#action#else#condition#condition[acts]action#action#else#condition#condition[acts]action#action#else#[acts]action[end]
Therefore you can have multiple conditions and actions in respect of the SAME starting "words conditions". .. Think about it; it could save writing several individual entries to build up a particular game puzzle and also cuts down on typing too!
Think of action "#else#" as meaning ELSE IF. The last use of action "#else#" in this example shows how to do an ELSE DO type of statement.
In other words if NONE of the previous Response entry conditions and actions were executed then this default action in respect of the valid words conditions will ALWAYS be done. Notice there are no conditions before the [acts] tag for this "catch-all" usage of "#else#"
Example SCRIPT 1 or 2 usage format: [start]condition[acts]action#else#condition#condition[acts]action#else#condition[acts]action[end]
There are no "words conditions" in these coding editors but you could use #else# as above to truncate several entries into a single entry to save space...
You can still use the or-checking syntax ( "or_" prefix on conditions) in this new extension to TAB coding as well.
[start]words condition#or_ condition#or_condition[acts]action#else#or_condition#or_condition[acts]action#else#[acts]action[end]
Hope you like it!
Best wishes,
Phil.
Last edited by catventure on Fri Jul 18, 2008 1:41 pm; edited 1 time in total |
|
MidKnight Apprentice Adventurer
Number of posts : 32 Age : 54 Location : Haworth Yorkshire Humor : I am a Vulcan, I don't have emotions Adventure Points : 0 Registration date : 2008-06-08
| Subject: Re: TAB Coding Extension: "else" Thu Jul 17, 2008 10:24 pm | |
| "Hope you like it!"
Like it? I could smear it in jam and eat it for breakfast. One of the most handiest commands in TAB. Amazing how much code can be saved carefully using this command.
Jason |
|