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

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

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
sajuukthanatoskhar
Posts: 3
Joined: 16 Sep 2008, 00:12

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

Post 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?
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

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

Post by zwzsg »

use #blah instead of blah.n
sajuukthanatoskhar
Posts: 3
Joined: 16 Sep 2008, 00:12

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

Post 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 ?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

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

Post by Forboding Angel »

yep
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

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

Post 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
sajuukthanatoskhar
Posts: 3
Joined: 16 Sep 2008, 00:12

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

Post 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.
Post Reply

Return to “Help & Bugs”