Calling an array from an event and storing as game variable? (Solved)

This is probably really simple but I can't figure out what I'm doing wrong.

I'm trying to call a random string from an array stored in a .js. Then store it as a game variable through an in-game event.

My .js looks like this
Spoiler: .js
var prenom = ["Bob", "Tim", "Mike", "Joe"];

var firstnames = function() {
var firstname = prenom[Math.floor(Math.random() * 4)];
return firstname;
};

Then through the event I'm doing this....



The message always comes back as 0. I'm getting a "fistname is not defined" error.

Any help would be super appreciated.

Beth
Remove the first script line then add 's()' without the quotes to the end of the control variable line.
Thank you Sarlecc! That worked perfectly.

Original thread: https://forums.rpgmakerweb.com/threads/calling-an-array-from-an-event-and-storing-as-game-variable-solved.82489/