Headless server invalid arguement error

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
kynelongtail
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat Oct 24, 2015 8:20 pm
Contact:

Headless server invalid arguement error

Post by kynelongtail »

I'm having a problem getting my server going again. giving me an 'invalid arguement' error with the server settings command line.

This is my serverstart.bat

Code: Select all

 start /wait Factorio.exe --start-server C:\Users\Dyne\AppData\Roaming\Factorio\saves\server.zip --server-settings E:\Steam\steamapps\common\Factorio\data\server.json\ --no-log-rotation 
and the error itself

Code: Select all

Error when opening E:\Steam\Steamapps\common\Factorio\data\server.json for reading: invalid arguement
can anyone help?

Loewchen
Global Moderator
Global Moderator
Posts: 8341
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Headless server invalid arguement error

Post by Loewchen »

Post the server.json, mask any passwords.

kynelongtail
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat Oct 24, 2015 8:20 pm
Contact:

Re: Headless server invalid arguement error

Post by kynelongtail »

server.json here

Code: Select all

{
  "name": "Dyne's Game",
  "description": "Let's have some fun, yo!",
  "tags": ["game", "tags"],

  "_comment_max_players": "Maximum number of players allowed, admins can join even a full server. 0 means unlimited.",
  "max_players": 5,

  "_comment_visibility": ["public: Game will be published on the official Factorio matching server",
                          "lan: Game will be broadcast on LAN"],
  "visibility":
  {
    "public": true,
    "lan": true
  },

  "_comment_credentials": "Your factorio.com login credentials. Required for games with visibility public",
  "username": "***",
  "password": "***",

  "_comment_token": "Authentication token. May be used instead of 'password' above.",
  "token": "",

  "game_password": "***",

  "_comment_require_user_verification": "When set to true, the server will only allow clients that have a valid Factorio.com account",
  "require_user_verification": true,

  "_comment_max_upload_in_kilobytes_per_second" : "optional, default value is 0. 0 means unlimited.",
  "max_upload_in_kilobytes_per_second": 0,

  "_comment_minimum_latency_in_ticks": "optional one tick is 16ms in default speed, default value is 0. 0 means no minimum.",
  "minimum_latency_in_ticks": 0,

  "_comment_ignore_player_limit_for_returning_players": "Players that played on this map already can join even when the max player limit was reached.",
  "ignore_player_limit_for_returning_players": false,

  "_comment_allow_commands": "possible values are, true, false and admins-only",
  "allow_commands": "true",

  "_comment_autosave_interval": "Autosave interval in minutes",
  "autosave_interval": 10,

  "_comment_autosave_slots": "server autosave slots, it is cycled through when the server autosaves.",
  "autosave_slots": 5,

  "_comment_afk_autokick_interval": "How many minutes until someone is kicked when doing nothing, 0 for never.",
  "afk_autokick_interval": 0,

  "_comment_auto_pause": "Whether should the server be paused when no players are present.",
  "auto_pause": true,

  "only_admins_can_pause_the_game": false,

  "_comment_autosave_only_on_server": "Whether autosaves should be saved only on server or also on all connected clients. Default is true.",
  "autosave_only_on_server": true,
  
  "_comment_non_blocking_saving": "Highly experimental feature, enable only at your own risk of losing your saves. On UNIX systems, server will fork itself to create an autosave. Autosaving on connected Windows clients will be disabled regardless of autosave_only_on_server option.",
  "non_blocking_saving": false,

  "_comment_admins": "List of case insensitive usernames, that will be promoted immediately",
  "admins": []
}

tacgnol
Inserter
Inserter
Posts: 36
Joined: Sun May 29, 2016 3:51 am
Contact:

Re: Headless server invalid arguement error

Post by tacgnol »

i'm no expert, but my guess would be

"lan": true

should be

"lan": true,

notice the ,

kynelongtail
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat Oct 24, 2015 8:20 pm
Contact:

Re: Headless server invalid arguement error

Post by kynelongtail »

indeed, fixed that but still same error. I believe it is more with the .bat commands than the .json itself.

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Headless server invalid arguement error

Post by posila »

tacgnol wrote:i'm no expert, but my guess would be

"lan": true

should be

"lan": true,

notice the ,
It shouldn't. Standard JSON doesn't allow comma at the end of collection.

The problem is you are passing path to server.json as folder name, not as file name. Remove trailing backslash

Code: Select all

--server-settings E:\Steam\steamapps\common\Factorio\data\server.json

kynelongtail
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat Oct 24, 2015 8:20 pm
Contact:

Re: Headless server invalid arguement error

Post by kynelongtail »

That fixed it! thank you very much! gotta love simple syntax mistakes XD

Post Reply

Return to “Technical Help”