[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 571: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 627: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
forum.starcraftai.com • Problem using getUnitsInRadius()
Page 1 of 1

Problem using getUnitsInRadius()

Posted: Tue Jan 24, 2012 5:54 am
by swen

Posted: Wed Jan 25, 2012 8:19 pm
by Heinermann

Posted: Thu Jan 26, 2012 3:05 am
by swen
Thanks for the tip Heinermann, definitely makes it more readable (and also saves that little bit of processing time I guess)
- unfortunately the result is still the same: unit iteration works (all units are found), but any search for surrounding units returns an empty set :/

Posted: Fri Feb 24, 2012 1:01 am
by Kae
[quote name='swen' date='26 January 2012 - 12:05 PM' timestamp='1327547133' post='10688']
Thanks for the tip Heinermann, definitely makes it more readable (and also saves that little bit of processing time I guess)
- unfortunately the result is still the same: unit iteration works (all units are found), but any search for surrounding units returns an empty set :/
[/quote]

Yeah, I had the same problem. So far, I fixed it using UnitGroup::inRadius from BWSAL.

Posted: Fri Feb 24, 2012 7:11 am
by krasi0
[quote name='Kae' date='24 February 2012 - 03:01 AM' timestamp='1330045277' post='10768']
[quote name='swen' date='26 January 2012 - 12:05 PM' timestamp='1327547133' post='10688']
Thanks for the tip Heinermann, definitely makes it more readable (and also saves that little bit of processing time I guess)
- unfortunately the result is still the same: unit iteration works (all units are found), but any search for surrounding units returns an empty set :/
[/quote]

Yeah, I had the same problem. So far, I fixed it using UnitGroup::inRadius from BWSAL.
[/quote]
I think Heinermann has fixed this now. Try using a newer BWAPI3 revision

Posted: Mon Feb 27, 2012 3:59 pm
by Heinermann
This issue was fixed here int r4054. http://code.google.com/p/bwapi/source/detail?r=4054

Posted: Thu Mar 01, 2012 4:26 am
by swen
Works perfectly for me now, thanks for the fix!

Posted: Sun May 06, 2012 3:27 pm
by Heinermann