Issues with Scripting in Cards

Try enclosing your script in a function, like this:

3 Likes