Why can't I splice, and are there alternatives??

Okay, so I tried to make the text pop up like how you guys did it with the little girl in the random NPC dialogue tutorial, and I got this error when testing it:
Spoiler: The Error I got:
Capture5.PNG
It worked in MV, so why not in MZ?? HELP???? If it's not possible in MZ, are there any alternatives? Did I type in something wrong? What happened?
Here's my event pages to show you what I did:
Spoiler: Pages
Capture7.PNG


Capture6.PNG

What I was planning is having the man say 6 phrases in a random order, not repeating any until they have all been said. The phrases will include the Protagonist's name, which the player can choose. That's why I don't have the array having any words.
you used three different script commands. but whenever a script command is closed, all local data gets deleted.

combine the three command lines in a single script command, that should work if the code itself is correct.
Alright! Lemme try that!
EDIT: Found my problem!
I didn't set the variable to an array before testing it, because the variable setup was on another page, and I tested JUST ONE event page. And not the one that controlled the variables.
Oops.
Thanks for your suggestion! I think it helped!

Original thread: https://forums.rpgmakerweb.com/threads/why-cant-i-splice-and-are-there-alternatives.151444/