Closed jiwertz closed 1 year ago
I belive this should have been resolved by now with PR https://github.com/GameServerManagers/LinuxGSM/pull/4257
@dgibbs64, I agree that the "fn_info_game_con: command not found" error is no longer occurring, however, when running the bf1942server details
command, it still doesn't appear to be parsing the information from the configuration file correctly.
Battlefield: 1942 Server Details
================================================================================
Server name: NOT SET
Server IP: 0.0.0.0:0
Internet IP: <REDACTED>:0
Display IP: <REDACTED>:0
Server password: NOT SET
Maxplayers: 0
These properties above should have populated from the serversettings.con file.
After investigating further, I've narrowed down the problem to the fn_info_game_keyvalue_pairs()
method. It would seem this method is expecting the second argument (the config file property) to be followed by an =
sign, and then the property's value, but Battlefield 1942 doesn't use an equals sign in it's serversettings.con
file, it is separated by spaces. Example:
game.serverMaxPlayers 32
game.serverPort 14567
So the fn_info_game_keyvalue_pairs()
is unable to parse the properties because of this.
In addition, the fn_info_game_bf1942()
method is looking for the wrong property for the server IP. It is looking for game.serverIp
, but it should actually be game.serverIP
(note the capital "P"). WIthout this change, it is unable to find the correct IP address from the serversettings.con file.
Hopefully this information helps!
Thanks for this. I will sort out a big fix
Seems to be working, for the most part. Not sure it's a major issue, but the new logic for fn_info_game_keyvalue_pairs_space()
only captures the last word after the last space for the configuration parameter. So if you have something like the following in the config file:
game.ServerName "My Awesome BFServer"
It comes out as the server name being just "BFServer"
Thanks. Getting the parsing correct for all configs is a work in progress 😅
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
User story
As a server administrator, I want the server to retrieve configuration settings from the serversettings.con file
Game
Battlefield 1942
Linux distro
Ubuntu 22.04
Command
command: start, command: details
Further information
After updating to the latest linuxgsm version, when executing any of the bf1942server commands (e.g. start, stop, details, etc..), multiple
fn_info_game_con: command not found
errors are printed from theinfo_game.sh
script.It seems that this functionality was recently re-worked, and this function was either removed or not implemented. Battlefield 1942 servers are unable to be started without any manual modifications to the
info_game.sh
file to ensure that important configuration settings (like server ip, port number, and server password) can be set, and the server be available for users to connect to.The server starts, but with default settings instead of the settings defined in the serversettings.con file.
Example: serversettings.con file contains the property
game.serverPort 14567
, but linuxgsm is staring the server on port 0 instead.Relevant log output
Steps to reproduce
No response