p4535992 / foundryvtt-downtime-dnd5e

A module for Foundry VTT that allows users to keep track of downtime activities, quest progress and... Well, pretty much anything you can track with a loading bar and a %.
MIT License
3 stars 2 forks source link

[BUG] ReferenceError: getMacroAsync is not defined #20

Closed SemBerretty closed 2 months ago

SemBerretty commented 4 months ago

Macro noob here trying to get a macro to work to increase the downtime progress with the number rolled. I've been using one of the example macros(which I had to alter since it also gave errors). The macro itself adds progress, but I cant add it to the downtime activity because it comes up with errors trying to access it.

The downtime item: image

The macro: image

The error: image

I might not be adding the correct name/ID to the relevant field, but I tried the name and the UUID and both gave the same error.

Browser: Chrome

Foundry Version: Version 12 - 327 Game System: D&D 5e 3.2.1

Dejsving commented 3 months ago

upload your macro via the macros menu using the export menu and attach it - I'll look at it and try to help you

SemBerretty commented 3 months ago

upload your macro via the macros menu using the export menu and attach it - I'll look at it and try to help you

Sorry for the late reply. I really don't think its a macro issue. The issue is when I add the UUID of the macro to the downtime item and try to click the downtime item which should run the macro. This is not happening due to the error I referenced.

Dejsving commented 3 months ago

I checked your mistake with myself. It doesn't work either. The fact is that the author used the runMacroOnExplicitActor method, which is not defined in Foundry. I do not know the reason. But you can cure it like this: in the FoundaryData/Data/modules/downtime file-dnd5e/module.js you need to replace the line runMacroOnExplicitActor(actor, macro, macroData); number 2067 with the line macro.execute(); and everything will work for you.

p4535992 commented 3 months ago

Should be fixed on 1.3.8 sorry for the delay