Auto-translated
Ah, I see. It (the function) didn't recognize heroname as a hero. The function needs to be activated by a hero. For example, attach a touch/region trigger to it. Otherwise, it won't know which hero to give the army to...
Whatever