Page MenuHomeFeedback Tracker

using addScore command inside HandleScore event handler wil crash the game every time
Closed, ResolvedPublic


start a test mission with one player unit and run this in debug console:
player addEventHandler ["HandleScore",
_unit = _this select 0;
_object = _this select 1;
_score = _this select 2;

_unit addScore 10;

}] {F24970}


Legacy ID
Game Crash
Additional Information

The use case I am interested in for the HandleScore event handler is to be able to manipulate the MP scoretable. So it would be helpful to have an "addScore2" command that could also take as parameter the same object that is available inside HandleScore. I want to be able to give points not only the player who usually gets the score but also for the driver and gunner (usually tank commander gets the points and not the gunner or driver).

Example HandleScore code:

_unit = _this select 0;
_object = _this select 1;
_score = _this select 2;

if (vehicle _unit != _unit) then

[driver vehicle _unit, _object] addScore2 _score;
[gunner vehicle _unit, _object] addScore2 _score;
[commander vehicle _unit, _object] addScore2 _score;


Assuming the score table is empty before the code above is executed, the 3 players inside the tank now have 3 identical score lines on the table.

Event Timeline

d3nn16 edited Steps To Reproduce. (Show Details)Oct 15 2014, 10:40 PM
d3nn16 edited Additional Information. (Show Details)
d3nn16 set Category to Game Crash.
d3nn16 set Reproducibility to Always.
d3nn16 set Severity to None.
d3nn16 set Resolution to Fixed.
d3nn16 set Legacy ID to 2873874315.May 7 2016, 7:37 PM
d3nn16 edited a custom field.

Since handlescore is now triggered for addscore, this is logical outcome - endless loop

thank for the report. However, I cannot reproduce the crash even on a dedicated server. Could you please create a mission and upload it here? Thank you.

d3nn16 added a subscriber: d3nn16.May 7 2016, 7:37 PM

i added with the mission folder and the output I have in log file and the empty dump file that is generated when I shoot the OPFOR officer.

this issue is fixed (by the way I get an "Access Denied" page when I try to set the issue to "fixed" myself).

This comment was removed by Dwarden.