Problem using getUnitsInRadius()

https://github.com/bwapi/bwapi
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
swen
Posts: 3
Joined: Tue Jan 24, 2012 5:00 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Problem using getUnitsInRadius()

Postby swen » Tue Jan 24, 2012 5:54 am

Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Heinermann » Wed Jan 25, 2012 8:19 pm

swen
Posts: 3
Joined: Tue Jan 24, 2012 5:00 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby swen » Thu Jan 26, 2012 3:05 am

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 :/
Kae
Posts: 35
Joined: Tue Jun 28, 2011 1:26 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Kae » Fri Feb 24, 2012 1:01 am

[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.
krasi0
Posts: 254
Joined: Thu Dec 18, 2008 12:42 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby krasi0 » Fri Feb 24, 2012 7:11 am

[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
Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Heinermann » Mon Feb 27, 2012 3:59 pm

This issue was fixed here int r4054. http://code.google.com/p/bwapi/source/detail?r=4054
swen
Posts: 3
Joined: Tue Jan 24, 2012 5:00 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby swen » Thu Mar 01, 2012 4:26 am

Works perfectly for me now, thanks for the fix!
Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Heinermann » Sun May 06, 2012 3:27 pm


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “BWAPI (wrappers in other languages / questions and announcements related to BWAPI itself)”

Who is online

Users browsing this forum: No registered users and 11 guests