Author Topic: Modloader Broken?  (Read 2724 times)

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Modloader Broken?
« on: April 13, 2019, 07:07:47 PM »
I switched over to Windows 10 lately, and after I re-installed OP2, I've been getting this error message about the modloader every time I go to start the game, whether I'm actually trying to load a mod or not:
Code: [Select]
ConsoleModuleLoader.cpp, Line 95: A switch was expected but not found. Prefix switch name with '/' or '-'.
I've tried taking the NetFix/Nethelper sections out of the INI but there was no change.  Any ideas on what could be going on?

Edit: We found out it was because the OP2 path had a space in the name.  This was never a problem with older versions of op2ext.dll; could someone please fix that?  Thanks!
« Last Edit: April 13, 2019, 07:18:46 PM by Sirbomber »
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Vagabond

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1015
Re: Modloader Broken?
« Reply #1 on: April 13, 2019, 10:00:13 PM »
The console mod path with spaces bug is fixed in the GitHub op2ext repository and on the development copy of Outpost 2 in the SVN repository. Of course with the SVN repository being down, this doesn't help you.

We planned to push a new version of Outpost 2 containing this fix a few months ago, but the effort stalled out for some reason. Partially because the SVN has been down, but there was time when it was up that we could have accomplished.

See the attached dev build off the current branch. If you decide to try it and encounter any issues, I would be interested in knowing to fix them. Might want to check the readme on GitHub as there is now a built in logger and some new "safer" version of functions.

-Brett