Arma 3
Ravage
Not able to double click items in inventory
On opening Inventory in game brings up "Error Type Number, expected Bool"

The code is expecting True or False.


the offending code is: Ravage \ code \ survival \ inventory.sqf - line 73

Insert "false" at the beginning of the line (we're just giving the code a bool), like so:


false } count [633, 638, 619];


And, still testing but don't see any problems with using ravage items.
I've just done a fresh install of Arma 3, and was only running Ravage and CBA on Altis and ran into this problem.
< >
Showing 1-1 of 1 comments
sukhoi191 Jun 20 @ 11:30am 
Quick and dirty workaround (will possibly work until the next major update after 2.20): revert to version 2.18.

You can do this by right-clicking ArmA 3 on Steam, selecting Properties > Betas and inputting ArmA3Legacy218 in the "Private Betas" text box, and clicking "Check Code".

I don't know exactly how the legacy branching works in ArmA 3 but according to the wiki ( https://community.bistudio.com/wiki/Arma_3:_Steam_Branches ) it seems like they keep only the latest legacy version. So, when we get to ArmA 3 version 2.22, we might not have access to 2.18 anymore.

-----

Problem description:

I've done some digging. The full code fragment is:

{
((findDisplay 602) displayCtrl _x) ctrlSetEventHandler ["LBDblClick", "_this call fnc_gearLBDblClick"];//ctrlAddEventHandler ?
} count [633, 638, 619];

According to BI wiki ( https://community.bohemia.net/wiki/count ), in the Notes section, Ebay wrote:

"With the alternative syntax each iteration should result in an interior return of bool or nothing. Example:
createDialog "RscFunctionsViewer";
{ lbAdd [292901, _x]; } count ["first", "second", "third"];
lbAdd returns a number, so this throws "Error Type Number, expected Bool". Tested in A2OA 1.63.131129"

Apparently, when using count in this manner, the internal block code should either return a Boolean, or Nothing. Again, according to BI wiki ( https://community.bohemia.net/wiki/ctrlSetEventHandler ), ctrlSetEventHandler should always return Nothing but this is not the case anymore. I made a test with open inventory and the following code prints "2":

hint format ["%1", ((findDisplay 602) displayCtrl 633) ctrlSetEventHandler ["LBDblClick", "_this call fnc_gearLBDblClick"]]

BI did an undocumented change in ctrlSetEventHandler return type lately (in version 2.18, ctrlSetEventHandler returns Nothing, in 2.20 it returns a number - possibly a handler ID, just like ctrlAddEventHandler).

The fix should be simple but I'm not sure if Haleks works on this project anymore :(

The core problem can be reproduced with a very simple example:

{
2
} count [1]

This shows the exact error message we're getting.
Last edited by sukhoi191; Jun 20 @ 12:53pm
< >
Showing 1-1 of 1 comments
Per page: 1530 50