# Scripting not working with %\_max\_counter%?

**URL:** https://community.mp3tag.de/t/scripting-not-working-with-max-counter/5518
**Category:** Export
**Created:** [September 30, 2007, 9:16pm UTC](https://community.mp3tag.de/t/scripting-not-working-with-max-counter/5518 "2007-09-30T21:16:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![supertagger](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/3ec8ea/32.png) [@supertagger](https://community.mp3tag.de/u/supertagger)
#### Post date: [September 30, 2007, 9:16pm UTC](https://community.mp3tag.de/t/scripting-not-working-with-max-counter/5518/1 "2007-09-30T21:16:16Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![milka](https://community.mp3tag.de/user_avatar/community.mp3tag.de/milka/32/55_2.png) [@milka](https://community.mp3tag.de/u/milka)
#### Post date: [October 1, 2007, 9:26am UTC](https://community.mp3tag.de/t/scripting-not-working-with-max-counter/5518/2 "2007-10-01T09:26:58Z")

</div>

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

---

<div class="post-metadata">

### Author: ![supertagger](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/3ec8ea/32.png) [@supertagger](https://community.mp3tag.de/u/supertagger)
#### Post date: [October 3, 2007, 9:31am UTC](https://community.mp3tag.de/t/scripting-not-working-with-max-counter/5518/3 "2007-10-03T09:31:18Z")

</div>

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

st 🙂

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
