Scripting not working with %_max_counter%?


#1

Hi,

I am trying to make my script say "1 Album" if there is just one album in a particular loop, and "5 Albums" (PLURAL) if there are more than one.

I thought this should work using this line:

$ifgreater(%_max_counter%,1,Albums,Album)

Unfortunately, it does not work - is there any other way? I am trying to export to text.

Thanks.


#2

It shoud work, maybe you didn't put %_max_counter% out of the loop.

ex:

$loop(%album%)
$loopend()
$ifgreater(%_max_counter%,1,Albums,Album)

%_max_counter% - Maximum value of counter of the last closed loop.

~ milka


#3

Yeah! That WAS it! Thank you so much Milka, now it works.

st :slight_smile:

QUOTE (milka @ Oct 1 2007, 12:26) <{POST_SNAPBACK}>
It shoud work, maybe you didn't put %_max_counter% out of the loop.

ex:

$loop(%album%)
$loopend()
$ifgreater(%_max_counter%,1,Albums,Album)

%_max_counter% - Maximum value of counter of the last closed loop.

~ milka