|
|
(One intermediate revision by the same user not shown) |
Line 1: |
Line 1: |
− | Just a quick string parsing example. Note that this is a rather inefficient way of setting it up, but it catches all possibilities. It's quite possible to use nested if/otherwise/end ifs for shorter code with less redundancy, but for those new to string parsing this is safer.
| + | Hmm. Apparently previous example was wrong. That's what I get for going by forums. |
− | | |
− | [if [victor] is male and is not female]
| |
− | [if [loser] is male and is not female]Male on male VM[end if]
| |
− | [if [loser] is male and is female]Male on herm VM[end if]
| |
− | [if [loser] is female and is not male]Male on female VM[end if]
| |
− | [if [loser] is not male and is not female]Male on neuter VM[end if]
| |
− | [end if]
| |
− | [if [victor] is male and is female]
| |
− | [if [loser] is male and is not female]Herm on male VM[end if]
| |
− | [if [loser] is male and is female]Herm on herm VM[end if]
| |
− | [if [loser] is female and is not male]Herm on female VM[end if]
| |
− | [if [loser] is not male and is not female]Herm on neuter VM[end if]
| |
− | [end if]
| |
− | [if [victor] is female and is not male]
| |
− | [if [loser] is male and is not female]Female on male VM[end if]
| |
− | [if [loser] is male and is female]Female on herm VM[end if]
| |
− | [if [loser] is female and is not male]Female on female VM[end if]
| |
− | [if [loser] is not male and is not female]Female on neuter VM[end if]
| |
− | [end if]
| |
− | [if [victor] is not male and is not female]
| |
− | [if [loser] is male and is not female]Neuter on male VM[end if]
| |
− | [if [loser] is male and is female]Neuter on herm VM[end if]
| |
− | [if [loser] is female and is not male]Neuter on female VM[end if]
| |
− | [if [loser] is not male and is not female]Neuter on neuter VM[end if]
| |
− | [end if]
| |
Hmm. Apparently previous example was wrong. That's what I get for going by forums.