# Function called twice

**URL:** <https://forum.kirupa.com/t/function-called-twice/250996>\
**Category:** Uncategorized\
**Created:** [February 4, 2008, 2:02pm UTC](https://forum.kirupa.com/t/function-called-twice/250996 "2008-02-04T14:02:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Niels\_Overwijn](https://avatars.discourse-cdn.com/v4/letter/n/58f4c7/32.png) [@Niels\_Overwijn](https://forum.kirupa.com/u/Niels_Overwijn)\
**Post date:** [February 4, 2008, 2:02pm UTC](https://forum.kirupa.com/t/function-called-twice/250996/1 "2008-02-04T14:02:32Z")

</div>

Hello,

does anybody know why the function in this next script is called twice?

Thanks,  
Niels

```auto
function functie()
{
    trace("function called");
    return(0);
}

var Ar:Array = [0,0];
Ar[functie()]++;
trace(Ar);

/* output:

function called
function called
1,0

*/

```
