Shield against archers

Does anyone know effective code for shielding against archers?

Does this.shield() not work?

Unless some-one/thing else is going to kill the archers, shielding won’t help.

When you are shielded you can’t do anything else: no attack no move, just continually shield-shield-shield,

What are you trying to accomplish with the shielding?
I find shielding in a loop (any type of loop) works well, but you need a condition to break that loop, or to do something other than shield within that loop to accomplish anything; as has already been stated, shielding is a stationary action.