mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2026-04-25 06:05:57 +03:00
[GH-ISSUE #4246] [Bug]: fn_info_game_con function not found #2670
Labels
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/LinuxGSM#2670
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jiwertz on GitHub (Jun 17, 2023).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/4246
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 founderrors are printed from theinfo_game.shscript.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.shfile 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
@dgibbs64 commented on GitHub (Sep 1, 2023):
I belive this should have been resolved by now with PR https://github.com/GameServerManagers/LinuxGSM/pull/4257
@jiwertz commented on GitHub (Sep 6, 2023):
@dgibbs64, I agree that the "fn_info_game_con: command not found" error is no longer occurring, however, when running the
bf1942server detailscommand, it still doesn't appear to be parsing the information from the configuration file correctly.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'sserversettings.confile, it is separated by spaces. Example: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 forgame.serverIp, but it should actually begame.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!
@dgibbs64 commented on GitHub (Sep 6, 2023):
Thanks for this. I will sort out a big fix
@dgibbs64 commented on GitHub (Sep 10, 2023):
github.com/GameServerManagers/LinuxGSM@82e5da4b1d@jiwertz commented on GitHub (Sep 10, 2023):
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:It comes out as the server name being just "BFServer"
@dgibbs64 commented on GitHub (Sep 10, 2023):
Thanks. Getting the parsing correct for all configs is a work in progress 😅
@github-actions[bot] commented on GitHub (Oct 21, 2024):
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.