Page MenuHomeFeedback Tracker

BIS_fnc_door
Closed, ResolvedPublic

Description

The function BIS_fnc_door when checking if the door is currently locked uses the variable this rather than the functions parameter _structure.
This fine when used by the objects actions but means users need to remember or know about this caveat if using the function and to define this before calling the function.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Operating System Version
N/A
Category
Scripting
Steps To Reproduce

In Eden place a "Land_ConcreteWall_01_l_gate_F" and give it a variable name of "Gate"
Preview the mission and in the debug console write

[ gate, 1, 1 ] call BIS_fnc_door;

The gate does not open as this is not defined inside the function
Now try

this = gate; [ gate, 1, 1 ] call BIS_fnc_door;

and the gate will open.

Event Timeline

Larrow created this task.Jul 2 2017, 8:15 PM

BIS_fnc_Door A3\Structures_f\scripts\fn_Door.sqf

this line :
if ((this getVariable [format ["bis_disabled_Door_%1", _door], 0]) != 1)
need to be change to :
if ((_structure getVariable [format ["bis_disabled_Door_%1", _door], 0]) != 1)

tom_48_97 closed this task as Resolved.Aug 16 2017, 11:25 AM

Fixed in RC ;)