Mega-Munchkin Attacks Error - resolved and deleted by author

UPDATE:

Never mind. I moved the line to a different location and now it runs without the error. Thanks anyway.

You should keep the problem and solution up so others can read this post if they ever come across the same problem.

It was just a basic structure problem. A variable that I defined wasn’t in a proper location. Once I moved the line inside the relevant if statement it corrected the issue. Normally I would leave the post here but it wasn’t an issue specific to the level and that’s why I deleted it.