Your probably getting an error because you need to have some kind of blank return in the function like if the for flow control returns nothing it will shoot itself in the head. Not saying it will happen, but on load it runs itself through those scenario's.
Just need to pop it in there for the scripts convenience.
Code Snippet
Plaintext
get_zone_spawners() { spawners = undefined;
zones = getentarray(self.script_noteworthy,"script_noteworthy");
for( k = 0; k < zones.size; k++ ) { spawners = getEntarray(zones[k].target,"targetname");
if(level.debug == true && zones[k].is_active == true) { iprintln("This zone has " + spawners.size + " spawners"); }
return spawners; }
return false; }
If not that, Is it an error your receiving or text not showing or is it always returning 0?
Your probably getting an error because you need to have some kind of blank return in the function like if the for flow control returns nothing it will shoot itself in the head. Not saying it will happen, but on load it runs itself through those scenario's.
Just need to pop it in there for the scripts convenience.
Code Snippet
Plaintext
get_zone_spawners() { spawners = undefined;
zones = getentarray(self.script_noteworthy,"script_noteworthy");
for( k = 0; k < zones.size; k++ ) { spawners = getEntarray(zones[k].target,"targetname");
if(level.debug == true && zones[k].is_active == true) { iprintln("This zone has " + spawners.size + " spawners"); }
return spawners; }
return false; }
If not that, Is it an error your receiving or text not showing or is it always returning 0?
Nah, the only issue that i get with it is that one or two AI spawn in other zones for whatever reason at the start and i have no real idea why.