Why are you registering a separate player spawn event for bots when there's already one for all players? That error doesn't make any sense. It says that the array is not created yet, but the creation is in plugin_precache() which should be called before the spawn event.