Originally Posted by
dogfisc
I agree, that all looks fine.
With only those two tokens on the map, it shouldn't even be hitting the line that is giving the error. It's looking at all tokens with 30 of the target (which excludes the target) and if the token it's checking is the attacker it never makes it to the comparison with nNearReach. The fact that you are getting nNearRange of 30 makes me think there is another token on the map. Since you are comfortable with checking the code, can you put in a debug to see what CT node it is looking at? This will work:
local rNearActorCT = CombatManager.getCTFromToken(checkToken);
Debug.chat("rNearActorCT: ", rNearActorCT, DB.getValue(ActorManager.getCTNode(rNearActorCT), "name"));
Thanks!