So what I'm trying to do is during a random turn in combat, check to see if one of my characters is unaffected by a specific state and, if so, add that state during that turn. This is what I tried just to see if it works:
!$gameActors.actor(1).isStateAffected(11)
But for some reason I keep getting this error:
Cannot read property 'opacity' of null
Not exactly sure what is happening cuz I checked other forums and what I have seems to be right. Any help would be nice. Here's some screenshots. THANK YOU!!