Ark
LOELeague of Extraordinary FoundryVTT Developers
•Created by Ark on 4/16/2025 in #package-development
Error message on Roll: await is only valid in async functions and the top level bodies of modules
I am trying to get the .total value on a roll but I am not able to. I know Roll is async and you have to await for the roll to be finalised before I can get the total but I get this error message on the console when I try to use await:
await is only valid in async functions and the top level bodies of modules
This is my code:
function on the main class of my module:
Hook outside my class where the getButton function is used:
Any help would be appreciated.
Cheers
5 replies