On the past I have written a "getTokenMap" macro on my own but would like to use the built-in getTokenMap function now.
Sadly, if I try to use this function I will get an "max recourse limit reached" error (don't know the exact translation atm) after some execusion time.
I have executed this function with different token names on different maps (all token names are unique on the whole campaign). And I got the same error every time.
Where should I look to find the issue?
Kind regards
from Purzelkater
getTokenMap and recourse limit
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
- Purzelkater
- Cave Troll
- Posts: 41
- Joined: Thu Oct 31, 2019 3:45 am
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: getTokenMap and recourse limit
You might want to share the campaign or create a campaign that shows the problem. I can't reproduce this.Purzelkater wrote: ↑Thu Sep 17, 2020 8:10 amOn the past I have written a "getTokenMap" macro on my own but would like to use the built-in getTokenMap function now.
Sadly, if I try to use this function I will get an "max recourse limit reached" error (don't know the exact translation atm) after some execusion time.
I have executed this function with different token names on different maps (all token names are unique on the whole campaign). And I got the same error every time.
Where should I look to find the issue?
What are your map names? You can use Wiki: getAllMapNames().
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."
Re: getTokenMap and recourse limit
sounds like you used a recursive function either intentionally or not. I'm guessing the latter meaning you are calling the function you are calling inside the function which if there's not exit procedure leads to a recurse limit. (of 1000 IRC).
so check your code and UDF's to track the error (or watch the log to see whats going on).
so check your code and UDF's to track the error (or watch the log to see whats going on).
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
- Purzelkater
- Cave Troll
- Posts: 41
- Joined: Thu Oct 31, 2019 3:45 am
Re: getTokenMap and recourse limit
Okay, your are right. It looks like it was my fault. I had declared a function named "getTokenMap" but the macro was just saved as "tokenMap". So calling getTokenMap has executed the tokenMap macro with had the new getTokenMap function inside. Really embarrassing, sorry... ^^
Thank you and kind regards
from Purzelkater
Thank you and kind regards
from Purzelkater
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: getTokenMap and recourse limit
We've all been there.
You can only stare at the screen for so long wondering what the heck's going on before seeking assistance...
Good news: I hear that 1.8 will have better error tracking. So, hopefully, macroscript life will soon get a little easier.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."