I had the same problem in the past.
I'm really not 100% on the scripting, but in C++ for instance, the operator for "equal to" comparison two equal signs, (==), not a single equal sign, (=).
I actually had the same problem, and am curious if this is the problem, but I actually wound up solving my problem the same way you did, except I used >49.
And for a bit of background, typically = is assignment, aka "this variable is now assigned this value"
if.. A=0, and B=5, then a statement like "A=B" would assign A the value of 5.
Now I could be talking out my ass here, but I think the issue would be that
"while="Core.Player.ClassLevel = 50"
would be stating
While: Assign players class level the value of 50
Which of course, makes absolutely no sense when you write it out in psudocode.
Of course, this is all hypothetical and I never tested it, but it makes sense in my eyes.
Either way, glad you made it work!