Static variables not accesible

This is what you’re doing wrong .

But the code looks fine, so it’s probably something else.