It's a formatting thingy:
1. because it's a IF sequence it needs to be I_EventCounter, EvenCounter is not suitable to start with as it requires as export the EventCounter event
2. because it's a IF sequence FactionType and NumBuildingsCompletedFaction will not work
Code:
if I_EventCounter BYZANTINE_RENAISSANCE_ALLOWED = 1 ; Constantinople has been lost before
and FactionType byzantium ; Constantinople has been recaptured
and NumBuildingsCompletedFaction ikoner_studio > 4 ; art was supported in the meanwhile
and I_EventCounter FL_is_crowned_ruler = 1 ; emperor is crowned
historic_event BYZANTINE_RENAISSANCE_STARTED ; benefits of Ikoner Studios will be higher (defined in EDB)
terminate_monitor
end_if
if I_TurnNumber > 250 ; fall-back in case Constantinople was not lost
and FactionType byzantium
historic_event BYZANTINE_RENAISSANCE_STARTED factions { byzantium, }
terminate_monitor
end_if
For cases like this you usually have a 'faction turn' monitor at the start of your script that sets an event counter which then can be used in a IF sequence, see example for byzantium, the log line adds an entry in the log to indicate when a faction's turn starts and ends which comes handy during bug hunting:
Code:
monitor_event PreFactionTurnStart FactionType byzantium
set_event_counter faction_turn_byzantium 1
log always Turn Start byzantium
end_monitor
monitor_event FactionTurnEnd FactionType byzantium
set_event_counter faction_turn_byzantium 0
log always Turn End byzantium
end_monitor
The FactionType lines will then simply look like this: and I_EventCounter faction_turn_byzantium = 1
For the NumBuildings condition you will need to use another monitor that sets (and resets at the faction's turn end) another event counter for use in the IF sequence.
Edit: on second thought the common FactionType condition could be put before the IF sequences. The NumBuilding remains an issue as it is only applicable to one IF sequence.
Having rambled extensively about the cause for the error I don't think that this script failure is fatal. It simply won't execute.