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

Script Questions

Hello,  So I have been creating a few customer sheets, and have posted topics for help a lot. One thing that people keep telling me is that i need to combine my scrips into one script works instead of having each one as its own script. My question is why should i do that? I am new to javascript and html so there may be something i don't understand. I keep each function as its own script so that it is easier for me to find the function im looking for and change it if it is not working right. Is this a bad thing to do?  Thanks,
1717082368

Edited 1717082455
vÍnce
Pro
Sheet Author
I'm not a programmer... According to roll20, it is recommended that all scripts are lumped inside a single &lt;script&gt; tag and placed at the end of the HTML.&nbsp; <a href="https://wiki.roll20.net/Sheet_Worker_Scripts#General" rel="nofollow">https://wiki.roll20.net/Sheet_Worker_Scripts#General</a> I think it's for continuity/consistency and possibly "scope" in regards to variable and hoisting when the sheet is loaded.&nbsp; Most sheets are community made and maintained and could have multiple people making updates and additions in the future.&nbsp; I really don't know the details, but 99% of the sheets on the roll20 follow this format.