schultzcole / FVTT-Turn-Alert

Set alerts to trigger on a particular round of combat or on a particular token's turn.
https://foundryvtt.com/packages/turnAlert/
MIT License
8 stars 4 forks source link

Error Passing Args #38

Open brunocalado opened 3 years ago

brunocalado commented 3 years ago

I'm trying to use args, but I'm getting an error.

The macro is added to turn alert ui. But, on the actor turn it don't get the args.

System

image

Macro

/**
 * Basic Message Turn Alert
 * Creates an alert that triggers on the current turn in
 *   the next round and displays a message.
 *
 * Author: Cole Schultz (cole#9640)
 * For other example macros and api reference,
 *   visit the Turn Alert wiki:
 *   https://github.com/schultzcole/FVTT-Turn-Alert/wiki
 */

const alertData = {
    round: 1,
    roundAbsolute: false,
    turnId: game.combat.combatant.id,
    message: "shaken shaken My Message",
macro: "unshaken turn",
          args: [ 'aasdfasdf asd fasdf ' ]
};
let token;
token = canvas.tokens.controlled[0];
console.log(game.combat.combatant.id)
console.log(token.id)

TurnAlert.create(alertData);

Error

image

unshaken turn

image