-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Whitespace sensitivity for EventMacro #3759
Comments
You forgot about the second "}". For Example:
|
yeah sorry for that typo, results stay the same fortunately/unfortunately. |
@KoukatsuMahoutsukai For example: " |
Thank you for elaborating on the points I raised. My main concern with it is if it was intended since not all programming languages are inherently whitespace sensitive, From my understanding the macro syntax undergoes regex transformation into Perl code through the plugin right? The plugin was designed to provide a pseudo code-like syntax, making it more user-friendly for non-technical users if I'm not wrong. However, the current whitespace sensitivity seems incongruent with this objective. Additionally, I couldn't find any mention of this sensitivity to spacing in the documentation. Although the examples here are of what works and what doesn't work. |
The wiki has detailed usage: |
I have read that and it has indeed detailed explanations but nowhere does it mention it is whitespace sensitive for Flow controls and labels, Also the macro plugin is different from the eventMacro plugin https://openkore.com/wiki/eventMacro. the example you gave:
wouldn't work at all with macro plugin since it has a different syntax, below is how while loops are used with macro plugin
And again my concern with it is if it was intended or not. |
macro 1 would do the first iteration and print out a $i = 0, then would proceed to break out of the while loop, when i turn on the debug messages i would get these at the end
[eventMacro] Script '}'.
[eventMacro] Script is the end of a not important block (if or switch).
macro 2 would work as intended, logging 1 to 10.
And macro 3 would outright crash the openkore and would output a message of
"The error message is:
Modification of non-creatable array value attempted, subscript -1 at plugins/eventMacro/eventMacro/Runner.pm line 1421."
The text was updated successfully, but these errors were encountered: