getTokenMap and recourse limit

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
User avatar
Purzelkater
Cave Troll
Posts: 41
Joined: Thu Oct 31, 2019 3:45 am

getTokenMap and recourse limit

Post by Purzelkater »

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

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: getTokenMap and recourse limit

Post by Full Bleed »

Purzelkater wrote:
Thu Sep 17, 2020 8:10 am
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?
You might want to share the campaign or create a campaign that shows the problem. I can't reproduce this.

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."

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: getTokenMap and recourse limit

Post by wolph42 »

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).

User avatar
Purzelkater
Cave Troll
Posts: 41
Joined: Thu Oct 31, 2019 3:45 am

Re: getTokenMap and recourse limit

Post by Purzelkater »

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

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: getTokenMap and recourse limit

Post by Full Bleed »

Purzelkater wrote:
Thu Sep 17, 2020 10:39 am
Really embarrassing, sorry... ^^
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."

Post Reply

Return to “Macros”