Page 1 of 1

Lua importing .inst is looking at the wrong path

Posted: Sat Feb 20, 2016 9:03 am
by VFA41_Lion
ERROR: Could not find a part of the path 'C:\Program Files (x86)\Steam\steamapps\common\Command Modern Air Naval Operations\GameMenu_CMANO\ImportExport\

well yeah, because my Command folder doesn't have a "gamemenu_cmano" subfolder... :(

Would creating the folder and stuffing all the game folders into it screw anything up?

edit: oh hey it does, it just only has a Lua folder, autoplay, and a copy of the executables and .dlls. Weird.

RE: Lua importing .inst is looking at the wrong path

Posted: Sat Feb 20, 2016 10:24 am
by mikmykWS
Could you please post the Lua code you used? That is key in troubleshooting this.

RE: Lua importing .inst is looking at the wrong path

Posted: Sun Feb 21, 2016 1:17 am
by VFA41_Lion

Code: Select all

x = math.random(1,3)
 if x == 1 then
     ScenEdit_ImportInst('India', 'Viraat CVBG-North.inst')
 elseif x == 2 then
     ScenEdit_ImportInst('India', 'Viraat CVBG-West.inst')
 else
     ScenEdit_ImportInst('India', 'Viraat CVBG-East.inst')
 end

Ultimately I fixed it by copying and pasting the import/export folder to the gamemenu_cmano folder. Doesn't seem to have adversely affected anything.

RE: Lua importing .inst is looking at the wrong path

Posted: Sun Feb 21, 2016 2:30 am
by michaelm75au
Do you have the scenario to attach here?

Normal location of that folder is off the game installed folder, regardless of Matrix or Steam version, I would have thought.
Might be interesting to see if it works on the Matrix install.

RE: Lua importing .inst is looking at the wrong path

Posted: Sun Feb 21, 2016 2:39 am
by michaelm75au
Tried a quick test on Matrix version and save an import as 'test.inst' in the expect folder C:\Matrix Games\Command Modern Air Naval Operations\ImportExport
1. ran a test from console and no error showed
ScenEdit_ImportInst('India', 'test.inst')
2. Tried it again with a different name and got expected error
ScenEdit_ImportInst('India', 'test2.inst')
ERROR: Could not find file 'C:\Matrix Games\Command Modern Air Naval Operations\ImportExport\test2.inst'.

Imports should be coming from the <game installed folder>\ImportExport as shown.
Not sure why Steam would be expecting a different folder.[&:]