You have a mistake on the variable definition:
var peons = this.getByType(‘peon’);
if(peon[0]){
You define “peons”, but you are calling “peon”
I hope that helps,
You have a mistake on the variable definition:
var peons = this.getByType(‘peon’);
if(peon[0]){
You define “peons”, but you are calling “peon”
I hope that helps,