Lol you tried to use jass for GUI =)
This is how you do it.
Open Gate
Events
Destructible - A destructible within (Entire map) dies
Conditions
(Destructible-type of (Dying destructible)) Equal to Lever
Actions
Set Integer = (Integer + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Integer Equal to 3
Then - Actions
Destructible - Open GATE<gen>
Else - Actions
Its Integer. For each gate you need to have an custom variable and a set amount i.e 3
Its..Just download the map above that I attached... Open Gate.w3x
Destructible - A destructible within (Entire map) dies
Not.
Set Integer = (Integer + 1)
EDIT: You got this right
Set Integer = 1
don't change it,
Destructible - A destructible within Region 025 <gen> dies