Bug report, compatability issue with this extension and "token height"
Fantasy grounds unity, latest live version. Extensions loaded:
EXTENSION: Token Height Indication v4.9 by GKEnialb
EXTENSION: Combat Modifier Calculation: Automatically calculate modifiers for flanking, range, and shooting into melee
When I try to attack with a ranged weapon targeting a token I get this error message:
Error message:
Handler error: [string "campaign/scripts/image.lua"]:147: attempt to index local 'targetToken' (a nil value)
I added a bunch of debug.chat commands in the "combat modifier calculation" to see when the error happens. The error happens when the extension calls this function (in the "manager_action_attack_custom.lue" file):
local adjTokens = srcImage.getTokensWithinDistance({x=tgtCoord.x, y=(tgtCoord.y * -1)}, 5);
To be specific since we have talked about this before:
1:
Open PC sheet
PC is in combat tracker and on map
enemy is in combat tracker and on map
drag ranged attack from PC sheet and drop it on the enemy token on the map (this mean I attack him with a ranged weapon)
Error message
2:
Do the same as 1 but attack with a melee weapon
Everything works fine
3:
Check that enemy token and PC token is in combat tracker and on map
In combat tracker, open the attack tab for the enemy
from the combat tracker find a ranged attack from the enemy and attack
Error message
Error does NOT happen when I only have this extension loaded, only when I have this and token height (and maybe others)
The error does NOT happen when I have "token height" and a bunch of other extensions loaded and not this one.
I have added a post here in the token height extension also.
https://www.fantasygrounds.com/forum...l=1#post617635