There are so many things I've never seen before going on in your code that I can't tell if you're scripting at a really advanced level or just making things up and hoping they work the way you want.
First, I've never seen monitor_event being nested inside another monitor_event. Even if it works in the sense of not throwing any errors, I don't understand the logic or intention of nesting of them like this.
Second, I've never seen _accepted/_declined being appended to an event name like that. As far as I know, that only works for historic_events because the game generates event counters with those suffixes when accept/decline decisions are made. It's news to me that the game does this in any other context and, if it works, I'd appreciate if you could explain how you discovered this and provide a list of similar working event-generated counters.
Third, I've never seen a comma used instead of a line return to separate commands. I would have assumed that would prevent CS from parsing.
Finally, e_select_character selects the character exported in the current event context, and since you've put this command inside an EventCounter monitor which doesn't export character_record, I would assume this command does nothing and therefore the character referred to by 'this' in the subsequent command is null since nobody is selected. But again, I've never seen monitors nested inside one another so who knows...
As for making a suggestion towards your original goal: there is only one event that fires when an adoption is accepted: BrotherAdopted, which iirc exports the character who gained the brother through adoption, not the brother himself. This event is obviously very limited in its application. Again, if your _accepted/_declined event counters exist, please let us know, that would potentially be a huge breakthrough for campaign scripting.
Edit: I've skimmed through OP's guide. He seems pretty convinced that nesting monitors works, but he provides no motivation for doing this. It should work the same and be more readable to have your monitors separate from one another. And anyway, there is no reason to use additional monitors for this. OP himself seems to know the virtues of while loops, and the most widely accepted way to handle yes/no decisions is like this:
An even more efficient system for this whole thing is to have only one EventCounter monitor which is used as a universal function caller.Code:historic_event my_event true while my_event_accepted == 0 and my_event_declined == 0 end_while if my_event_accepted == 1 ;do stuff for accept end_if if my_event_declined == 1 ;do stuff for decline end_if
Assuming nested monitors works, my next guess would be that your script fails because your _accepted/_declined event counters don't exist.Code:historic_event my_event true monitor_event EventCounter TrueCondition if I_EventCounter my_event_accepted > 0 set_event_counter my_event_accepted 0 ;do stuff for accept end_if if I_EventCounter my_event_declined > 0 set_event_counter my_event_declined 0 ;do stuff for decline end_if ;all other event counter calls here end_monitor