Make a namespace for our scripts #16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We should slap everything under a namespace
var NamespaceName = NamespaceName || {};
From https://app.roll20.net/forum/post/146759/constants-available-to-the-whole-script#post-147508
"I imagine very complex scripts will even take advantage of an "export"/closure-based protection as well, e.g.:"
(function() {
//Do stuff in here, only modifying/access konrad if you need to work outside this particular script.
})();
I've used both methods in the command, encounter, treasure, gm modules. Works well.