Menu Options

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
Rhishisikk
Posts: 214
Joined: August 12th, 2008, 4:58 pm
Location: As Contract Demands
Contact:

Menu Options

Post by Rhishisikk »

Any attempt to filter menu options by [have_unit] totally removes the option. (Always evaluates to FALSE). Even commenting out the only probable cause doesn't affect this error. What am I doing wrong?

Code: Select all

[option]
message= _ {MENU_IMG_TXT {IMAGE} {MESSAGE}} + "
 -{GC} gold -{FC} food -{WC} wood -{IC} iron -{MC} mana"
[show_if]
  [have_unit]
    side=$side_number
    x,y=$x1,$y1
#    type={ANLU_Builders}
  [/have_unit]
[/show_if]
[command]
{SNIP}
Typhon Rhishisikk

If a man has a talent and cannot use it, he has failed. - Thomas Wolfe
Wesluck (TM): Guaranteed unlike any other luck, anywhere else. - Typhon

Main Projects: ANL: Universal (era), Gambit's Empire Builder
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Menu Options

Post by zookeeper »

You haven't by chance removed the unit before that [message]? That's the only thing you might have messed up there, I suppose.
User avatar
Rhishisikk
Posts: 214
Joined: August 12th, 2008, 4:58 pm
Location: As Contract Demands
Contact:

Re: Menu Options

Post by Rhishisikk »

I'll check to make sure that the [store_unit] isn't set to kill=yes.

[edit]
Woot! That's exactly it! You rock, Zookeeper.
[/edit]
Typhon Rhishisikk

If a man has a talent and cannot use it, he has failed. - Thomas Wolfe
Wesluck (TM): Guaranteed unlike any other luck, anywhere else. - Typhon

Main Projects: ANL: Universal (era), Gambit's Empire Builder
Post Reply