That's a bug with the Editor, as IceGod64 says. Specifically, if you have created a new trainer type (or item) in the Editor and then try to save them to the appropriate PBS file, you'll get that error.
I've fixed this bug for v10. For now, I suggest you use Notepad and edit the PBS file directly, to create any new trainer types/items. Remember to compile them afterwards.