Compile Errors - Using Painless

Thanks for the help.

Turns out the issue was naming.
You cannot use numbers to name the fields you're calling as it causes an error later on.
In my case: 4XXerror.
I renamed it to errors, and it works perfectly fine.