Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[Help] Newbie to API - SmartAoE error: "Cannot read properties of undefined"

Hello, I'm new to Roll20 API scripts and mods, and am trying to learn while getting my hands dirty with SmartAoE. While looking up some most-recommended scripts, I saw SmartAoE and was intrigued. I installed the script and went to the wiki page so that I could learn how to properly utilize it. I saw there were several pre-built macros, and I figured why not start there and try to learn by seeing it in action and toying around with it? I copied the Burning Hands code and created a macro. When I attempt to test it however, I am met with the following error: TypeError: Cannot read properties of undefined (reading 'spell_save_dc') So if I'm understanding this correctly (and sorry if I'm not, I really am not much of a code guy), the error is saying that "spell_save_dc" is undefined, and therefore it can't tell me what the Burning Hands DC is. (My guess  is that this is because the way 5e spells and 5e2024 spells define their properties is different, but I could be way off base.) Can anyone help me understand what's going wrong and how I can find properties in the future so that if this pops up again I know where to look to solve my issue?
1738686185
timmaugh
Pro
API Scripter
If you're using the 2024 sheet... there's your problem. Aside from... numerous... other issues, the way the 2024 sheet exposes data is... problematic. That's being as kind as I can be. And, yes, if a given game mechanic item is exposed from the sheet, it is also different from the 2014 sheet. I do not believe SmartAoE has been updated to work with the 2024 sheet, or if the 2024 sheet is in such a place to where SAoE *could* be updated, but I'll ping the author and get him to chime in.
1738783336
David M.
Pro
API Scripter
Timmaugh is correct that I haven't seriously looked into modifying for the 2024 sheet, mainly because things seemed to be in flux and I'm unsure if/when things will stabilize. 
Well, good to know my head was in the right place with my suspicions - I hope things stabilize and more API script compatibility will come soon!
Hi David M. Thought I'd use the opportunity to thank you for this script. It's such a great time saver once properly set-up and helps with immersion.    I love it so much that it's the main reason I'm not converting my campaign to Jumpgate or the 2024 sheet.