|
Solaras Wanderer
Joined: 11 Mar 2002 Posts: 93
|
Posted: Sun Jun 24, 2007 11:20 pm
%if question |
Hey,
Code: |
#show %format( " &-15s &3.0n", "Blank Needed", %if( !%iskey( @my_cards, nothing)), %db( @my_cards_maximum, nothing), %db( @my_cards_needed, nothing)) |
It should display the maximum needed (100) as set by the database if I have none, or set the amount needed if I do have some, which is set in the cards_needed database.
I haven't played enough with %if and %format though in order to solve this and it's irking my brain. If anyone could solve this one for me I would appreciate it.
This is what happens now.
Quote: |
Combat:
Aeon 100 0
Death 10 90
Devil 100 0
Empress 38 62
Emperor 6 94
Hangedman 20 80
Hierophant 9 91
Justice 10 90
Lovers 10 90
Lust 16 84
Moon 100 0
Star 100 0
Healing:
Fool 100 0
HighPriestess 100 0
Magician 100 0
Utility:
Chariot 10 90
Creator 10 90
Hermit 8 92
Tower 79 21
Universe 100 0
Miscellaneous: |
This is what should happen.
Quote: |
Combat:
Aeon 100 0
Death 10 90
Devil 100 0
Empress 38 62
Emperor 6 94
Hangedman 20 80
Hierophant 9 91
Justice 10 90
Lovers 10 90
Lust 16 84
Moon 100 0
Star 100 0
Healing:
Fool 100 0
HighPriestess 100 0
Magician 100 0
Utility:
Chariot 10 90
Creator 10 90
Hermit 8 92
Tower 79 21
Universe 100 0
Miscellaneous:
Blank Needed 100 |
Assuming I had no blanks cards at all. Or it should display how many is needed depending on how many I have. |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Mon Jun 25, 2007 3:57 am |
Please edit your post to use [ code ] [ /code] tags instead of quote tags to preserve formating.
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Jun 25, 2007 11:01 am |
Your %if function seems to be just this:
%if( !%iskey( @my_cards, nothing))
Did you add one too many brackets to the end there and one too few at the very end of the #show command? |
|
|
|
|
|