-
Notifications
You must be signed in to change notification settings - Fork 263
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
[Bug]: metamacro functions producing Java errors #4582
Comments
This change has broken all the functions it touches. E.g., if (parameters.get(1).toString().equalsIgnoreCase("campaign")) {
return getMacros(delim, MapTool.getCampaign().getMacroButtonPropertiesArray());
} else if (parameters.get(1).toString().equalsIgnoreCase("gm")) {
return getMacros(delim, MapTool.getCampaign().getGmMacroButtonPropertiesArray());
} else {
Token token = FunctionUtil.getTokenFromParam(resolver, functionName, parameters, 1, 2);
return getMacros(delim, token);
} to if (parameters.size() > 1) {
if (parameters.get(1).toString().equalsIgnoreCase("campaign")) {
return getMacros(delim, MapTool.getCampaign().getMacroButtonPropertiesArray());
} else if (parameters.get(1).toString().equalsIgnoreCase("gm")) {
return getMacros(delim, MapTool.getCampaign().getGmMacroButtonPropertiesArray());
}
} else {
Token token = FunctionUtil.getTokenFromParam(resolver, functionName, parameters, 1, 2);
return getMacros(delim, token);
} So there is now no way to use this function with parameters, unless we happen to use the new |
Hmmm... that could be problematic. Just a little bit. That being said, it will only break every framework known to man, |
Fixed the fix. Properly this time. Complete with lots of testing to prevent future embarrassment |
Awesome, looks good now! |
Describe the Bug
https://discord.com/channels/296230822262865920/905157521193455676/1188456999755714610
To Reproduce
use metamacro function without all optional parameters
Expected Behaviour
should function cleanly
Screenshots
No response
MapTool Info
No response
Desktop
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: