Forged Alliance Forever Forged Alliance Forever Forums 2017-05-07T16:50:01+02:00 /feed.php?f=3&t=14424 2017-05-07T16:50:01+02:00 2017-05-07T16:50:01+02:00 /viewtopic.php?t=14424&p=148033#p148033 <![CDATA[Re: Cannot launch skirmish directly from command line]]> https://github.com/FAForever/fa/commit/ ... bf7b107038

Just edit C:\ProgramData\FAForever\gamedata\lua.nx2\lua\factions.lua according to above commit and it launches correctly. (lua.nx2 is a zip)

Statistics: Posted by iliis — 07 May 2017, 16:50


]]>
2017-04-25T00:49:21+02:00 2017-04-25T00:49:21+02:00 /viewtopic.php?t=14424&p=147408#p147408 <![CDATA[Re: Cannot launch skirmish directly from command line]]>
I leave this here in case somebody else has the same problem...

Statistics: Posted by iliis — 25 Apr 2017, 00:49


]]>
2017-04-25T00:48:21+02:00 2017-04-25T00:48:21+02:00 /viewtopic.php?t=14424&p=147407#p147407 <![CDATA[Cannot launch skirmish directly from command line]]>
I'm trying my hands at modding and I tought it would be convenient to launch FA directly into a sandbox game. But when I open the windows command prompt and enter according to http://wiki.faforever.com/index.php?title=Command_Line_Switches:

Code:
"C:\ProgramData\FAForever\bin\ForgedAlliance.exe" /init init_faf.lua /windowed 1024 768 /showlog /map SCMP_015 /faction 1 /nofog /victory "sandbox"


I get the following error message:


Unable to launch /maps/SCMP_015/SCMP_015_scenario.lua: ...alliance\gamedata\mohodata.scd\lua\system\import.lua(37): Error importing '/lua/factions.lua'
state traceback: ...


excerpt from the log:
Code:
DEBUG: Wavebank prepared: 2c45bd0
DEBUG: Wavebank prepared: 2c46440
DEBUG: Wavebank prepared: 2c45d38
DEBUG: Loading module '\000/lua/singleplayerlaunch.lua\000'
DEBUG: Loading module '\000/lua/ui/maputil.lua\000'
DEBUG: Loading module '\000/etc/faf/mapblacklist.lua\000'
INFO: /faction
DEBUG: Loading module '\000/lua/factions.lua\000'
WARNING: ...gramdata\faforever\gamedata\lua.nx2\lua\factions.lua(79): access to nonexistent global variable "__active_mods"
WARNING: stack traceback:
WARNING:         [C]: in function `error'
WARNING:         ...alliance\gamedata\mohodata.scd\lua\system\config.lua(53): in function <...alliance\gamedata\mohodata.scd\lua\system\config.lua:52>
WARNING:         ...gramdata\faforever\gamedata\lua.nx2\lua\factions.lua(79): in function `GetSelectedMods'
WARNING:         ...gramdata\faforever\gamedata\lua.nx2\lua\factions.lua(46): in function <...gramdata\faforever\gamedata\lua.nx2\lua\factions.lua:41>
WARNING:         (tail call): ?
WARNING:         ...gramdata\faforever\gamedata\lua.nx2\lua\factions.lua(322): in main chunk
WARNING:         [C]: in function `doscript'
WARNING:         [C]: in function `pcall'
WARNING:         ...alliance\gamedata\mohodata.scd\lua\system\import.lua(48): in function `import'
WARNING:         ...alliance\gamedata\mohodata.scd\lua\system\import.lua(37): in function `import'
WARNING:         ...alliance\gamedata\lua.scd\lua\singleplayerlaunch.lua(233): in function <...alliance\gamedata\lua.scd\lua\singleplayerlaunch.lua:228>
WARNING:         ...alliance\gamedata\lua.scd\lua\singleplayerlaunch.lua(321): in function <...alliance\gamedata\lua.scd\lua\singleplayerlaunch.lua:297>
DEBUG: Loading module '\000/lua/maui/frame.lua\000'
DEBUG: Loading module '\000/lua/ui/uimain.lua\000'
DEBUG: Loading module '\000/lua/multiplayer/onlineprovider.lua\000'
DEBUG: Loading module '\000/lua/ui/campaign/campaignmanager.lua\000'
DEBUG: Loading module '\000/lua/ui/splash/splash.lua\000'
DEBUG: Loading module '\000/lua/maui/movie.lua\000'
DEBUG: OpenMovie /movies/thqlogo.sfd: 1
...


This happens independently of the map (SCMP_015 is Fields of Isis). And after the error the game proceeds to the main menu and I can manually launch a single-player game without issues.

Also, just using
Code:
"C:\ProgramData\FAForever\bin\ForgedAlliance.exe" /init init_faf.lua /map SCMP_015 /showlog


Fails with the same error message popup, but actually in a slightly different place in the code:

Code:
DEBUG: Wavebank prepared: 2c16170
DEBUG: Wavebank prepared: 2c165a8
DEBUG: Wavebank prepared: 2c15d38
DEBUG: Wavebank prepared: 2c16710
DEBUG: Loading module '\000/lua/singleplayerlaunch.lua\000'
DEBUG: Loading module '\000/lua/ui/maputil.lua\000'
DEBUG: Loading module '\000/etc/faf/mapblacklist.lua\000'
DEBUG: Loading module '\000/lua/factions.lua\000'
WARNING: ...gramdata\faforever\gamedata\lua.nx2\lua\factions.lua(79): access to nonexistent global variable "__active_mods"
WARNING: stack traceback:
WARNING:         [C]: in function `error'
WARNING:         ...alliance\gamedata\mohodata.scd\lua\system\config.lua(53): in function <...alliance\gamedata\mohodata.scd\lua\system\config.lua:52>
WARNING:         ...gramdata\faforever\gamedata\lua.nx2\lua\factions.lua(79): in function `GetSelectedMods'
WARNING:         ...gramdata\faforever\gamedata\lua.nx2\lua\factions.lua(46): in function <...gramdata\faforever\gamedata\lua.nx2\lua\factions.lua:41>
WARNING:         (tail call): ?
WARNING:         ...gramdata\faforever\gamedata\lua.nx2\lua\factions.lua(322): in main chunk
WARNING:         [C]: in function `doscript'
WARNING:         [C]: in function `pcall'
WARNING:         ...alliance\gamedata\mohodata.scd\lua\system\import.lua(48): in function `import'
WARNING:         ...alliance\gamedata\mohodata.scd\lua\system\import.lua(37): in function `import'
WARNING:         ...alliance\gamedata\lua.scd\lua\singleplayerlaunch.lua(29): in function `GetRandomFaction'
WARNING:         ...alliance\gamedata\lua.scd\lua\singleplayerlaunch.lua(238): in function <...alliance\gamedata\lua.scd\lua\singleplayerlaunch.lua:228>
WARNING:         ...alliance\gamedata\lua.scd\lua\singleplayerlaunch.lua(321): in function <...alliance\gamedata\lua.scd\lua\singleplayerlaunch.lua:297>
DEBUG: Loading module '\000/lua/maui/frame.lua\000'
DEBUG: Loading module '\000/lua/ui/uimain.lua\000'
DEBUG: Loading module '\000/lua/multiplayer/onlineprovider.lua\000'
DEBUG: Loading module '\000/lua/ui/campaign/campaignmanager.lua\000'
DEBUG: Loading module '\000/lua/ui/splash/splash.lua\000'
DEBUG: Loading module '\000/lua/maui/movie.lua\000'
DEBUG: OpenMovie /movies/thqlogo.sfd: 1
DEBUG: Preparing movie /movies/thqlogo.sfd: 1


Adding a "/faction 1" parameter leads to the same "access to nonexistent global variable "__active_mods"" error tough.

I haven't looked into more deeply into this, as I can launch a game trough the menu just fine (altough less conveniently ;) ).

Statistics: Posted by iliis — 25 Apr 2017, 00:48


]]>