Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

SmartAoE error – “Cannot read properties of undefined (reading '0')” only in the Out of the Abyss module

Hi! i been trying to run SmartAoE on Out of the abby but it always crashes with: TypeError: Cannot read properties of undefined (reading '0')     at apiscript.js:6210:156 when the same scripts ( several of then aren't working),  work for other campaigns without any problem, script example: !smartaoe {{ --title|Ataque monje --titlecardbackground|linear-gradient(135deg,#001f3b 0%,#0a4d8c 25%,#0f73d3 45%,#1490f2 70%,#45b3ff 85%,#003b73 100%) --rightsub| Attack total: [[ 1d20 + @{selected|dexterity_mod} + @{selected|pb} ]] ← (roll #0) --dc|$[[0]] --saveFormula|<<0d0 + a{npc_ac} >> ← AC del objetivo --damagesaverule|*0 --aoeType|5econe --forceIntersection|0 --radius|5ft --origin|nearest, face --minGridArea|0.25 --minTokArea|0.25 --fx|burn-blood --damageFormula1|[[ 1d6 + @{selected|dexterity_mod} ]] --damageType1|bludgeoning --ignore|SmartAOE_ignore,1 --instant|1 --autoApply|1 --bar|1 --conditionFail|red --conditionPass|green --zeroHPmarker|dead --triggerSound|golpe }} the mods im' using G  libInline G  SmartAoE G  Messenger G  SelectManager G  ScriptCards G  libTokenMarkers it  works fine in my other games and  campaigns  for example cos, can you help me?
1757332416
timmaugh
Forum Champion
API Scripter
Hey, luigive... a few things can help narrow down the issue, here... First, are you running Jumpgate, and are you running the Default sandbox for your scripts, or the Experimental Sandbox? (You can see that reported in your script log when the sandbox boots up). Next, can you install ScriptInfo from the one-click, then run: !scriptinfo 6210 That will take the line of the error (6210) and relate it to a specific line in one of your scripts (or in reference to one of your scripts, if the script who owns that  line of code isn't set up to report it... but if it truly reports back to SmartAoE, that script should report accurately). Having the disambiguated line can help us figure out what is going wrong. And then, if we still can't pinpoint it from this information, having the full stack of the error can help. When you get the pink box of failure, there will be several lines of nested calls. Having this full stack can point to the source of errors, sometimes.
it is jumpgate, default sandbox, and this what the infoscript shows: Script Information (Line 6210) That line number does not correspond to any script reporting its offset. It occurs 5845 lines after the end of libInline, and 77 lines before the start of Messenger. Script Information SCRIPT NAME START / LINES libInline (1.0.6) 14 / (352) Messenger (1.0.2) 6288 / (661) SelectManager (1.1.9) 6949 / (1139) ScriptCards (3.0.12) 8089 / (7234) libTokenMarkers (0.1.2) 15326 / (194) ScriptInfo (0.0.3) 15519 / (143) and this is what the console shows: Spinning up new sandbox... "Loading character sheet data..." "ŦŦ libInline v1.0.6, 2022/9/13 ŦŦ -- offset 14" "   _____________________________________________       )_________________________________________(          )_____________________________________(                  ___| |_______________| |___                       |___   _______________   ___|                          | |               | |                              | |               | |                              | |               | |                              | |               | |                              | |               | |                ______________|_|_______________|_|_______________                                                    " "SmartAoE v0.30 initialized." "ŦŦ Messenger v1.0.2, 2025/5/20 ŦŦ -- offset 6288" "ŦŦ SelectManager v1.1.9, 2025/7/15 ŦŦ -- offset 6949" "ScriptCards: 3 Templates loaded" "ScriptCards Triggers Active. Trigger Character ID is -OZbkS0C7fHr_8cfhPc_" "ScriptCards Message Triggers enabled? No" "-=> ScriptCards - 3.0.12 by Kurt Jaegers Ready <=- Meta Offset : 8089" "-=> libTokenMarkers v0.1.2 <=-  [Sun Jan 09 2022 18:47:18 GMT+0000 (Coordinated Universal Time)]" "  > Loaded 55 Token Markers." "              ________________________                           ╱                 ______ ╲                         ╱                    _____ ╲                       ╱                       ____ ╲                     ╱______________________________╲                        | _____          _____ |                            | |_|_|    MOD   |_|_| |                            | |_|_|   _____  |_|_| |                            |         |   |        |                            |         |  o|        |               _____________|_________|___|________|______________                                                     " "🏠 ScriptInfo v0.0.3, 2024/5/29 🏠 -- offset 15519" "##########> Sandbox [DEFAULT 2025-04-19] : Ready fired after 1.61s, 174 objects." {"who":"error","type":"error","content":"Unable to find a player or character with name: luigiveUnhandled"} TypeError: Cannot read properties of undefined (reading '0') TypeError: Cannot read properties of undefined (reading '0')     at  apiscript.js:6210:156
1757341344
timmaugh
Forum Champion
API Scripter
OK, let me see if I can summon David to take a look at that...
1757376113
David M.
Pro
API Scripter
Thanks for the heads-up Tim! Not sure if this will help, but Jumpgate really screwed things up for SmartAoE. I have a 90% solution that I haven't yet officially deployed that takes a different approach if it detects that it is a Jumpgate game. The AoE squares are drawn on the new Foreground layer instead of the token layer, and it uses the new pathv2 paths for the lines/outlines (which probably doesn't mean anything to you, but just another thing that Roll20 did to make me hate life. If you want to test out the new version, see the link below for a manual install. I believe that it should work for everything except trigger-target style AoE triggers. I still haven't figured out why that is suddenly not working in the Jumpgate version. This new version should be compatible with both Jumpgate and Legacy game environments. <a href="https://github.com/djmoorehead/SmartAoE/blob/main/0.31/SmartAoE.js" rel="nofollow">https://github.com/djmoorehead/SmartAoE/blob/main/0.31/SmartAoE.js</a> If it's still a problem, let me know and I can try to recreate it.
thanks a lot!, i'm sorry for the delay answer i will be testing that and tell you the results. once again thanks.
i tried with the that new script and get the same error, the problem is i tried in cos JUMPGATE and it works fine! but in out of the&nbsp; abbys fresh campaign doesnt.. its weird..
1757710339
David M.
Pro
API Scripter
Hm, maybe try a different map within OoTA? Sometime I get weird results on some maps and not others. If it works on a different map (same game), then try to make a copy of that map and see if that works.