# Tips on User Defined Variables

**URL:** https://community.mp3tag.de/t/tips-on-user-defined-variables/4738
**Category:** Support
**Created:** [April 13, 2007, 1:00am UTC](https://community.mp3tag.de/t/tips-on-user-defined-variables/4738 "2007-04-13T01:00:27Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [April 13, 2007, 10:10am UTC](https://community.mp3tag.de/t/tips-on-user-defined-variables/4738/2 "2007-04-13T10:10:02Z")

</div>

> [@Al Margheim](#):
>
> ... What I didn't grok at first is that a referencing a variable in a loop causes a new variable with the same name to be created. The  
> new variable hides the original variable within the loop. When the loop ends, the second variable no longer hides the original variable.  
> Another subtlety I didn't anticipate is that variables created in a loop continue to exist outside the loop and retain their value. ...

I think you've discovered for yourself one of the design flaws of Mp3tag's scripting system.  
I mentioned the same thing some time ago in the german section 'Mp3tag Forums \> Mp3tag - Deutsch \> Bugs' but did not receive any answer yet.  
[Benutzerdefinierte Variable nicht sichtbar in Loop](https://community.mp3tag.de/t/4489/1)  
I wish Florian to have some time to make this part of the scripting language more clear.

DD.20070413.1406

---

_[View the full topic](https://community.mp3tag.de/t/tips-on-user-defined-variables/4738)._
