I have a similar macro with nearly identical code that works, so not sure why this one is throwing this error.
Here's the code snippet:
[h: vMacroLinkText = macroLinkText("Thunderstrike Echo@lib:Weather SFX", "none")]
[overlay(overlayName, zOrder): {
r[: '
<html>
<head>
<meta charset="UTF-8">
' + css + '
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div class="thunder-container">
<div class="lightning"></div>
</div>
<script src="script.js"></script>
<a id="runMacro" style="display:none" href="[r: vMacroLinkText]">/<a>
<script>
let runMacro = document.getElementById("runMacro");
function playSound() {
runMacro.click();
}
const intervalID = setInterval(playSound, 5000);
</script>
</body>
</html>
']
}]
It starts running okay, and then every time it hits the interval (5 second) mark, it pops the error in the screenshot. 🙁
Thanks for any help!