shaygman / MCC_sandbox_modDev

9 stars 14 forks source link

Exported SQM isn't escaping quotes #69

Open kjohnson0451 opened 2 years ago

kjohnson0451 commented 2 years ago

If I copy+paste the generated SQM from a very simple mission, Arma 3 won't be able to read it unless I manually replace the unescaped quotes I'm talking about.

Steps to reproduce:

There should be some classes with init properties that have unescaped quotes. Warning: very long lines of code ahead, but you don't need to look at the entire lines.

On line 52 of my exported SQM for instance, I see

init="this setVariable ["RscAttributeOwners",[west]];[this,"RscAttributeTaskDescription",["","",""]] call bis_fnc_setServerVariable;this setVariable ["bis_fnc_moduleinit_iscuratorplaced",false];this setVariable ["showmarker",[26b7d526b00# 164025: laptop_unfolded_f.p3d,true]];this setVariable ["updated",true];this setVariable ["bis_fnc_moduleinit_status",false];this setVariable ["bis_fnc_initmodules_activate",false];this setVariable ["bis_fnc_initmodules_disableautoactivation",false];this setVariable ["bis_fnc_initmodules_priroty",1];this setVariable ["cba_xeh_isprocessed",true];this setVariable ["rscattributeowners",[WEST]];this setVariable ["attachobject_object",26b7d526b00# 164025: laptop_unfolded_f.p3d];this setVariable ["tasktype","search"];this setVariable ["show3d",true];this setVariable ["rscattributetaskstate","created"];this setVariable ["rscattributetaskdescription",["Acquire Intel.<br/><br/>HQ believe that we have an opportunity to acquire top notch information about enemy forces operating in the area.<br/>According to info from High Command the target data is in a Laptop (Open), located in this area.<br/>Retrieve the information and bring it back for analysis.","Acquire the Laptop (Open)","Acquire the Laptop (Open)"]];this setVariable ["cba_xeh_isinitialized",true];this setVariable ["taskname",["L Modules:21",""]];this setVariable ["proiority",0];this setVariable ["#var","bis_o1"];this setVariable ["notification",true];this setVariable ['updated',true];";

If I manually replace all those quotes like so, it works, in that I can edit the mission in the Editor.

init="this setVariable [""RscAttributeOwners"",[west]];[this,""RscAttributeTaskDescription"",["""","""",""""]] call bis_fnc_setServerVariable;this setVariable [""bis_fnc_moduleinit_iscuratorplaced"",false];this setVariable [""showmarker"",[26b7d526b00# 164025: laptop_unfolded_f.p3d,true]];this setVariable [""updated"",true];this setVariable [""bis_fnc_moduleinit_status"",false];this setVariable [""bis_fnc_initmodules_activate"",false];this setVariable [""bis_fnc_initmodules_disableautoactivation"",false];this setVariable [""bis_fnc_initmodules_priroty"",1];this setVariable [""cba_xeh_isprocessed"",true];this setVariable [""rscattributeowners"",[WEST]];this setVariable [""attachobject_object"",26b7d526b00# 164025: laptop_unfolded_f.p3d];this setVariable [""tasktype"",""search""];this setVariable [""show3d"",true];this setVariable [""rscattributetaskstate"",""created""];this setVariable [""rscattributetaskdescription"",[""Acquire Intel.<br/><br/>HQ believe that we have an opportunity to acquire top notch information about enemy forces operating in the area.<br/>According to info from High Command the target data is in a Laptop (Open), located in this area.<br/>Retrieve the information and bring it back for analysis."",""Acquire the Laptop (Open)"",""Acquire the Laptop (Open)""]];this setVariable [""cba_xeh_isinitialized"",true];this setVariable [""taskname"",[""L Modules:21"",""""]];this setVariable [""proiority"",0];this setVariable [""#var"",""bis_o1""];this setVariable [""notification"",true];this setVariable ['updated',true];";

So the SQM exporter is just broken. I don't know if some commit broke it, or it was always like this and just underwent bitrot in that Arma 3 stopped accepting this syntax.

kjohnson0451 commented 2 years ago

20220201202428_1