Open tposney opened 2 years ago
You're right that's a problem. In v10 I discontinued using advanced macros internally which allows me to pass self referential objects (like workflow and actor - if the actor is an unlinked actor) as arguments to the macro, which is convenient most of the time.
This does mean args[0] is no longer safe to pass to a macro.execute when advanced macros is active.
I can't think of an easy way for midi to know if you are going to call an execute as GM macro inside your macro.
For the moment, deleting args[0].workflow and args[0].actor is the best workaround.
In GitLab by @gantonaci on Nov 11, 2022, 07:18
I have a macro that stopped working after upgrading to v10. After some digging I could reproduce the error with a simple macro.
I have two script macros,
macroPlayer
andmacroGM
.macroPlayer
is called by Midi-QoL in a spell (OnUse, After Active Efects)macroGM
flagged to "Execute Macro As GM"MacroPlayer
is:MacroGM
is:If I, as the GM, roll the spell, the macro executes flawless and
args
is outputted to the GM console. If my player roll the spell nothing is outputted to the GM console. The player console gets an error:The following is a workaroud for
macroPlayer
:Versions and modules: FoundryVTT 10, build 288
DnD5e 2.0.3
Advanced Macro 1.17.3
DAE 10.013
Find the CUlprit 1.4.6
liwrapper 1.12.10.0
Midi QoL 10.0.21
Socketlib 1.012
Times Up 10.0.2