Variables (help)
#1
Can anyone help me with getting this variable to work please all info on my problem is in this post Link

Thanks
Reply
#2
(2021-08-13, 18:08)tillaz87 Wrote: Can anyone help me with getting this variable to work please all info on my problem is in this post Link

Thanks

Code:
<variable name="Custom_Age_Rating_AEL">
  <value condition="String.IsEqual($INFO[ListItem.Property(esrb)],RP (Rating Pending))">[COLOR white]?[/COLOR]</value>
  <value condition="String.IsEqual($INFO[ListItem.Property(esrb),EC (Early Childhood))">[COLOR green]3+[/COLOR]</value>
  <value condition="String.IsEqual($INFO[ListItem.Property(esrb)],E (Everyone))">[COLOR green]7+[/COLOR]</value>
  <value condition="String.IsEqual($INFO[ListItem.Property(esrb),E10+ (Everyone 10+))">[COLOR green]10+[/COLOR]</value>
  <value condition="String.IsEqual($INFO[ListItem.Property(esrb),T (Teen))">[COLOR orange]12+[/COLOR]</value>
  <value condition="String.IsEqual($INFO[ListItem.Property(esrb)],M (Mature))">[COLOR orange]16+[/COLOR]</value>
  <value condition="String.IsEqual($INFO[ListItem.Property(esrb),A0 (Adults Only))">[COLOR red]18+[/COLOR]</value>
</variable>]

String.IsEquals does not require the $INFO[] , you have an extra ] at the end of the variable, and you can't use ( or ) in the text to match against, try this, note the change from String.IsEqual to String.Contains:-

Code:
<variable name="Custom_Age_Rating_AEL">
  <value condition="String.Contains(ListItem.Property(esrb),RP)">[COLOR white]?[/COLOR]</value>
  <value condition="String.Contains(ListItem.Property(esrb),EC)">[COLOR green]3+[/COLOR]</value>
  <value condition="String.Contains(ListItem.Property(esrb),E10+)">[COLOR green]10+[/COLOR]</value>
  <value condition="String.Contains(ListItem.Property(esrb),E)">[COLOR green]7+[/COLOR]</value>
  <value condition="String.Contains(ListItem.Property(esrb),T)">[COLOR orange]12+[/COLOR]</value>
  <value condition="String.Contains(ListItem.Property(esrb),M)">[COLOR orange]16+[/COLOR]</value>
  <value condition="String.Contains(ListItem.Property(esrb),AO)">[COLOR red]18+[/COLOR]</value>
</variable>
Reply
#3
(2021-08-13, 20:07)roidy Wrote:
(2021-08-13, 18:08)tillaz87 Wrote: Can anyone help me with getting this variable to work please all info on my problem is in this post Link

Thanks

Code:
<variable name="Custom_Age_Rating_AEL">
  <value condition="String.IsEqual($INFO[ListItem.Property(esrb)],RP (Rating Pending))">[COLOR white]?[/COLOR]</value>
  <value condition="String.IsEqual($INFO[ListItem.Property(esrb),EC (Early Childhood))">[COLOR green]3+[/COLOR]</value>
  <value condition="String.IsEqual($INFO[ListItem.Property(esrb)],E (Everyone))">[COLOR green]7+[/COLOR]</value>
  <value condition="String.IsEqual($INFO[ListItem.Property(esrb),E10+ (Everyone 10+))">[COLOR green]10+[/COLOR]</value>
  <value condition="String.IsEqual($INFO[ListItem.Property(esrb),T (Teen))">[COLOR orange]12+[/COLOR]</value>
  <value condition="String.IsEqual($INFO[ListItem.Property(esrb)],M (Mature))">[COLOR orange]16+[/COLOR]</value>
  <value condition="String.IsEqual($INFO[ListItem.Property(esrb),A0 (Adults Only))">[COLOR red]18+[/COLOR]</value>
</variable>]

String.IsEquals does not require the $INFO[] , you have an extra ] at the end of the variable, and you can't use ( or ) in the text to match against, try this, note the change from String.IsEqual to String.Contains:-

Code:
<variable name="Custom_Age_Rating_AEL">
  <value condition="String.Contains(ListItem.Property(esrb),RP)">[COLOR white]?[/COLOR]</value>
  <value condition="String.Contains(ListItem.Property(esrb),EC)">[COLOR green]3+[/COLOR]</value>
  <value condition="String.Contains(ListItem.Property(esrb),E10+)">[COLOR green]10+[/COLOR]</value>
  <value condition="String.Contains(ListItem.Property(esrb),E)">[COLOR green]7+[/COLOR]</value>
  <value condition="String.Contains(ListItem.Property(esrb),T)">[COLOR orange]12+[/COLOR]</value>
  <value condition="String.Contains(ListItem.Property(esrb),M)">[COLOR orange]16+[/COLOR]</value>
  <value condition="String.Contains(ListItem.Property(esrb),AO)">[COLOR red]18+[/COLOR]</value>
</variable>

Thank you I have it working now do you know if it's possible to have and animation start on a button press for example button Y on a gamepad?

At the moment in having to just use OnNext etc with a delay

xml:


<control type="group">

<width>240</width>
<height>343</height>
<left>1250</left>
<top>200</top>

<control type="image">

<texture diffuse="diffuse/fanart-square.png" background="true">$INFO[ListItem.Art(boxback)]</texture>
<aspectratio>stretch</aspectratio>

<animation type="Visible" reversible="true">

<effect type="slide" start="0" end="-260" center="auto" delay="10000" time="500" />

</animation>
<visible>!Container(909).OnNext + !Container(909).OnPrevious</visible>
</control>
</control>]
Reply

Logout Mark Read Team Forum Stats Members Help
Variables (help)0