Page 1 of 1

Health bars and Buildbars, 'For' limit must be a number

Posted: 08 Jan 2012, 01:39
by sajuukthanatoskhar
Hey guys,

I have had a recurring problem since the new spring build 2 builds ago (somewhere in 8.4, after september, I can't remember)

My two beloved widgets, the healthbar and buildbar widgets aren't working anymore. As soon as I activate them, I get an error message saying that the

#line# : 'for' limit must be a number

in the console

I have seen people post screens with a buildbar working.


gui_buildbar
The console points to line 641 as the problem.

unit_healthbar
Line 203.


what's going on with this and how is it solved?

Re: Health bars and Buildbars, 'For' limit must be a number

Posted: 08 Jan 2012, 02:03
by zwzsg
use #blah instead of blah.n

Re: Health bars and Buildbars, 'For' limit must be a number

Posted: 08 Jan 2012, 02:41
by sajuukthanatoskhar
zwzsg wrote:use #blah instead of blah.n
I don't understand?

At line 639 of buildbar, replace local totalUnits = teamUnits.n

with local totalUnits = #teamUnits ?

Re: Health bars and Buildbars, 'For' limit must be a number

Posted: 08 Jan 2012, 02:59
by Forboding Angel
yep

Re: Health bars and Buildbars, 'For' limit must be a number

Posted: 08 Jan 2012, 03:08
by knorke
if you just want to play:
all the more-or-less maintained games should have working widgets etc.
There should be no reason to have eg a local healthbar widgets, the game likely has it already.

if you want to dev Lua:
http://springrts.com/phpbb/viewtopic.php?f=14&t=26302

Re: Health bars and Buildbars, 'For' limit must be a number

Posted: 08 Jan 2012, 03:46
by sajuukthanatoskhar
Thanks for that guys. My stuff is working again!

@Knorke, unfortunately buildbar wasn't updated or something when i dl'd a new copy of it from Jobjol. The upside of this is that I know how to deal with with this problem as it comes from now on.