Problem with multiboard

Status
Not open for further replies.
The variable array NrPlayerChange is never set, so you can't use it properly.
You directly can use "Loop for each Jnumber from 1-4", instead of using IntegerB loop and then incrementing Jnumber by your own.
(it's called "For each integer variable".)

Btw, it's no multiboard, but a leaderboard. And please try to explain us next time what exactly to test/look for, so it's easier for us to help.
 
Level 37
Joined
Aug 6, 2015
Messages
785
The variable array NrPlayerChange is never set, so you can't use it properly.
You directly can use "Loop for each Jnumber from 1-4", instead of using IntegerB loop and then incrementing Jnumber by your own.
(it's called "For each integer variable".)

Btw, it's no multiboard, but a leaderboard. And please try to explain us next time what exactly to test/look for, so it's easier for us to help.

i want "LeaderBoard" to show evey player count of alive units.
so i changed the system, and still the count is not working right.
 

Attachments

  • MB.w3x
    16.1 KB · Views: 34
  • Leaderboard - Change the value for TablePlayer[Jnumber] in LeaderBoardP to (Number of units in (Units owned by TablePlayer[Jnumber] matching (((Picked unit) is alive) Equals True)))
You only can use "PickedUnit" withint the "PickEveryUnitAndDoActions" operation.
In your case you need "... matching (Matching unit) is alive Equals True".

Tell me if you have problems with the for integer variable loop.
You leak unit groups. In case you are interested, read this: http://www.hiveworkshop.com/forums/tutorial-submission-283/memory-leaks-263410/#post2661133
 
Level 37
Joined
Aug 6, 2015
Messages
785
  • Leaderboard - Change the value for TablePlayer[Jnumber] in LeaderBoardP to (Number of units in (Units owned by TablePlayer[Jnumber] matching (((Picked unit) is alive) Equals True)))
You only can use "PickedUnit" withint the "PickEveryUnitAndDoActions" operation.
In your case you need "... matching (Matching unit) is alive Equals True".

Tell me if you have problems with the for integer variable loop.
You leak unit groups. In case you are interested, read this: http://www.hiveworkshop.com/forums/tutorial-submission-283/memory-leaks-263410/#post2661133
oh i used picked -_-..
thanks.
about leaks i know,) thanks
 
Level 37
Joined
Aug 6, 2015
Messages
785
Be aware that that action leaks... and as you probably run that action a lot, that means that it is pretty nasty shit.
Try placing a custom script (if you havent got that already) that says "set bj_wantDestroyGroup = true" just above that action.
placing that above the
  • Leaderboard - Change the value for TablePlayer[Jnumber] in LeaderBoardP to (Number of units in (Units owned by TablePlayer[Jnumber] matching (((Picked unit) is alive) Equals True)))
?
i though it is needed only when u pick unit groups.
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
uhm... yea I made a mistake there... :D
When you create a unit group (meaning "Units owned by <player> matching <boolean>" created a new group), you also have to destroy it.
However the bj_wantDestroyGroup only works when you loop through the group.
So in this case, you have to place that group in a variable, use the variable in the action and do the custom script "call DestroyGroup(udg_*groupname*)" where *groupname* (including the stars) must be replaced by your variable name.
 
Level 37
Joined
Aug 6, 2015
Messages
785
uhm... yea I made a mistake there... :D
When you create a unit group (meaning "Units owned by <player> matching <boolean>" created a new group), you also have to destroy it.
However the bj_wantDestroyGroup only works when you loop through the group.
So in this case, you have to place that group in a variable, use the variable in the action and do the custom script "call DestroyGroup(udg_*groupname*)" where *groupname* (including the stars) must be replaced by your variable name.

i don't get it, why need to put *groupname* with stars.
that's not even workin with stars :eekani:
 
Level 37
Joined
Aug 6, 2015
Messages
785
u6xyUcO.png

nvm the russian language
so how do i make it right
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
You are not using the variable yet.
Try to place the variable in the leaderboard function (Number of units in GroupUnitsMultiboard)
And you have to set the condition when you create the group.
The bj_wantDestroyGroup can be removed as it wont work in this case.

And the DestroyGroup requires an array index.
You use an array variable which means that you require an array index.
Use "call DestroyGroup(udg_GrouUnitsMultiboard[udg_Jnumber])"
 
Status
Not open for further replies.
Top