As Andrew said, it should be: <<set $WealthQuality to
with an “i”.
Lots of times the worst “stumpers” when debugging code are the tiniest letter, space, or punctuation errors, since they’re so easy to miss. In college I helped one friend debug some code that he’d stared at for three hours unable to fix. I spent an hour looking at it before I saw the problem, and it turned out it was a single out-of-place space (* / instead of */) which caused a chunk of code to be incorrectly commented out.