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] Very quick SmartAoE question

Hello! Is there a shorthand for adding a comment line in SmartAoE? I've noticed that some scripts use |\ or |/, and Java uses // to add a comment line. I've been unable to find any note in the wiki for SmartAoE about the script regarding adding comment lines. I've used some macros where I comment on a line without a -- ahead of it, and it doesn't seem to break anything, but I want to make sure that I don't f*** something up by doing so. Thanks in advance :)
1669497278
David M.
Pro
API Scripter
Since everything is a simple --command|parameter(s) format without complex logic, etc. as can be found in something like Scriptcards, there is no official commenting syntax in SmartAoE.  So, it will likely be hit or miss depending on the content of your comment and how it interacts with the parsing. For example, if the "comment" contains certain keywords or special characters used by the script, then there is a decent probability something is going to get messed up.   
Alright. I appreciate the help David! I'll see what happens with each macro that has a comment :)
1669649454
timmaugh
Pro
API Scripter
Since the metascript stuff gets filtered out before the standard script would catch the message, you could use metascript syntax to put comments in. The following would require Plugger to be installed: !smartaoe {{   --title|Spectralescence   {&eval}There is no word to describe this macro's perfection. So I'm forced to make one up. And I'm going to do so right now. Scrumtrulescent.{&/eval}   --leftsub|Slot level ?{Cast at what level?|2,2|3,3|4,4|5,5|6,6|7,7|8,8|9,9} ... }} Everything between & including the EVAL block tags would get parsed out. Just be aware that Plugger will issue that message as a script-message (e.g., sending a message through to the script sandbox with the command line of: !There is no word to describe...etc.... So make sure you don't have a script that will act on the message (nothing answers the !There handle, so you're ok, here).