What did I do wrong?
Code:
Ban
Events
Unit - |c00ff0000Banner 0000 <gen> Is issued an order targeting an object
Conditions
(Issued order) Equal to (Order(attack))
And - All (Conditions) are true
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Targeted unit) is A structure) Equal to True
Then - Actions
Dialog - Change the title of dialogban to (Are you sure you want to ban + (Name of (Triggering player)))
Dialog - Create a dialog button for dialogban labelled Yes
Dialog - Create a dialog button for dialogban labelled No
Dialog - Show dialogban for Player 1 (Red)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to Dialogyes
Then - Actions
Game - Defeat (Owner of (Targeted unit)) with the message: Defeat!
Else - Actions
Do nothing
Else - Actions
Do nothing