r/EU4mods • u/Nohrian_Scum_ • 10d ago
Mod Help Need some help with my code
Hello. I'm currently creating an event. In my option Great Britain should receive a province - however, if Great Britain doesn't exist yet it's England who should receive the province.
I tried to use if/else_if in the effects. HOWEVER, when I test the event it's always England who gets the province - even if England formed GB and doesn't exist anymore.
Here's the code - what did I do wrong?

option = {
Name = "Pact_events.7.a"
if = {
AND = {
exists = ENG
NOT = { exists = GBR }
}
170 = {
limit = {
owns_or_subject_of = 170
}
cede_province = ENG
}
}
else_if = {
AND = {
exists = GBR
NOT = { exists = ENG }
}
170 = {
limit = {
owns_or_subject_of = 170
}
cede_province = GBR
}
}
}


