When calling any method of a HashMap or a HashMapObject without specified arguments, _this in the method code will be same as in the parent enviroment.
Description
Description
Details
Details
- Severity
- None
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 11 x64
- Category
- General
Steps To Reproduce
[1, 2, 3] call { _hash = createHashMapObject [[ ["MyMethod", { systemChat str _this }] ]]; _hash call ["MyMethod"]; // prints [1,2,3] _hash call ["MyMethod", []]; // prints [] };
[1, 2, 3] call { _hash = createHashMapFromArray [ ["MyMethod", { systemChat str _this }] ]; _hash call ["MyMethod"]; // prints [1,2,3] _hash call ["MyMethod", []]; // prints [] };
Additional Information
Game version is 2.18.152746 (profiling branch)
Event Timeline
Comment Actions
It behaves the same as
call x vs [] call x
Not sure what would be correct behavior here?
HashMapObject call, currently works same as normal call works, so I'd say this is by design
Comment Actions
@dedmen according to syntax 3 https://community.bistudio.com/wiki/call#Syntax_3 _this in this case should be nil as expected