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.
Description
Details
- Severity
- Minor
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 10 x64
- Category
- Zeus - General
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.
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
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.