Page MenuHomeFeedback Tracker

Script error in Zeus when editing a vehicle that is "playerlocked"
Closed, ResolvedPublic

Description

A script error is generated when double-clicking a vehicle in Zeus that has a locked state of "LOCKEDPLAYER". Apparently, the vehicle properties dialog can only handle "locked" and "unlocked" states.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Zeus - General
Steps To Reproduce

Run ARMA with "Show Script Errors" checked. Put down a vehicle in Zeus. Select it and LOCAL EXEC the command

(curatorSelected select 0 select 0) setVehicleLock "LOCKEDPLAYER";

Then double click the vehicle, generating the script error.

Additional Information
Warning Message: 'enableDebugConsole/' is not a value
Error in expression <es find _selected;
_selectedIDC = _idcs select _selectedIndex;
['onButtonClick',>
Error position: <select _selectedIndex;
['onButtonClick',>
Error Zero divisor
File A3\ui_f_curator\UI\RscCommon\RscAttributeLock.sqf..., line 39

Event Timeline

JB47394 created this task.May 17 2020, 4:47 AM

Select it and LOCAL EXEC the command

Are you using mods?

BIS_fnc_KK changed the task status from New to Need More Info.May 18 2020, 8:44 AM

Scripts, but no mods, per se. If you're focusing on the enableDebugConsole error, don't. I have a description.ext that specifies that value, and I will randomly see the enableDebugConsole/ error during most sessions. It produces a dialog that must be dismissed, and logs to the report file. If you have any thoughts on that, that would be much appreciated, but I'm really just focusing on the simple script error in this report. In this session, the enableDebugConsole error did happen during the same 1 second interval in the report file as the script error, but I see the enableDebugConsole error once during most sessions, and not at the same time as this script error. It appears to be coincidental. If you like, i can report that separately.

As for the script error, if you look at RscAttributeLock.sqf, you'll see

_states = [2,1,0];

and at the error point

_selected = locked _entity;
_selectedIndex = _states find _selected;
_selectedIDC = _idcs select _selectedIndex;

the operator "locked" can return values 3,2,1,0. The vehicle in question is locked for the player, so the function returns a value of 3, the find fails, returning -1, and an error is generated on the select.

In short, the dialog is incapable of displaying the "playerlocked" lock state. Even if the dialog cannot be updated, it would be nice if the script error wasn't generated.

BIS_fnc_KK changed the task status from Need More Info to Acknowledged.May 18 2020, 6:52 PM
BIS_fnc_KK updated the task description. (Show Details)May 19 2020, 1:42 PM
BIS_fnc_KK edited Steps To Reproduce. (Show Details)

should be fixed in dev soon

BIS_fnc_KK closed this task as Resolved.May 19 2020, 3:32 PM