Jona33 51 Posted June 2, 2015 I've been trying to get Bis_fnc_kbMenu to work and I'm going absolutely mental. I'm calling it with [["TEST","['Safehouse','Manhattan',['JNA_SAFEHOUSE_COOPER_SEARCHED_0','JNA_SAFEHOUSE_COOPER_SEARCHED_0'],nil,nil,true]"]] execVM "test2.sqf" (I'm using test2.sqf as I copied the code out so I could play around with it a bit). Basically I can get to the point where the line that calls Bis_fnc_kbTell looks like it should (tested with copyToClipboard), I can get it to the point where I can immediately plug it manually into Bis_fnc_kbTell and it works, but in context (i.e. when being called) it comes up with 'Manhattan' not found in cfgSentences, but when doing it manually it works absolutely fine. I can't find a single working example of this anywhere, I'm confident it's never popped up in an official mission. Share this post Link to post Share on other sites
AZCoder 921 Posted June 3, 2015 If you put a hint or copyToClipboard inside the function you copied, toward the bottom above the line _kbArray call bis_fnc_kbTell, then you will see the problem. When the code creates _kbArray, it leaves the original quotes intact and come up with something like this: ["'090_ambient_special_00','A_hub',nil, 'DIRECT', nil, nil, 1"]. The problem is that the entire array is still a string, and you can't call bis_fnc_kbTell like that or you'll get that error. So I changed a little of the code (roughly around line 80) in there like this: _kbArray = call compile (_kbArray select 0); // new line of code _kbArray call bis_fnc_kbTell; _result = bis_fnc_kbMenu_menu; That will compile the original quotes out of it. To test it I put this into my init.sqf: BIS_fnc_testMenu = compileFinal preprocessFileLineNumbers "scripts\BIS_fnc_kbMenu.sqf"; waitUntil { !isNil "BIS_fnc_testMenu" }; _topic = "['090_ambient_special_00','A_hub',nil, 'DIRECT', nil, nil, 1]"; _result = [ ["Display Name", _topic] ] call BIS_fnc_testMenu; For full effect, you'll need a unit named 'BIS_AlphaMemberA' and another named 'BIS_AlphaMemberB'. BTW, that function returns a value, so execVM will not work with it. Final note: I don't know if it's a bug in the function, or if it's just being called differently than BIS imagined. Share this post Link to post Share on other sites
Jona33 51 Posted June 3, 2015 Legend, I got to using _kbArray select 0 but my attempts at using call compile just ended badly, must have been using it wrong. Thank you very much. Share this post Link to post Share on other sites