I once tried to set it like pbMaxRaid(nil,nil,nil) so it would default size to 3, rank to random AND
species to random (which I thought it would give an error, but I still tried it). I don't think that was the issue because I tried it again with a new save and it defaulted to Ditto. After trying to reset things by changing the event back to just "pbMaxRaid", pasting the same "faulty" event onto different maps (they worked) and replacing the bad event with functional ones from different maps (still same error), I then thought about something being stored in that map that made the event go wrong everytime I triggered it. After reading what Lucidious89 answered (which was very informative!), I expanded the Variable limit and found which variables were being stored. I couldn't replicate the error again to see if this method would work, but i believe that by inserting "Control Variables: ["variable"] = 1" above "pbMaxRaid" it would force the Event to run with a new pokemon and fix the error. I might be wrong, as my experience and understanding level about coding is too low.
Thanks for reminding me about the CTRL method.
TfolChespin you need to copy the content of each of those 12 files in the Data folder, create 12 new slots in Scripts and paste each file's content on each slot. Must be above Main and below Compiler_MapsAndEvents.
It's on the INSTALLATION GUIDE.txt: