Do you know why I am getting this error..?
Viewing post in [CGMZ] Achievements for RPG Maker MZ comments
Hi, the issue is the option plugin you are using seems to be trying to change switch values as soon as it gets loaded which is happening even before CGMZ objects are initialized. You could try moving the order of [CGMZ] up or down (however it is not currently positioned) from the options plugin in the plugin manager.
Otherwise, you can add this code to the bottom of achievements:
Game_Switches.prototype.onChange = function() {
alias_CGMZ_Achievements_GameSwitches_onChange.call(this);
$cgmz?.checkAchievementSwitchesCriteria();
};
This will check if CGMZ is initialized first before trying to pay attention to switch changes.
