Jump to content

Error in LuaGUI server country flag check prevents joining game with DNS name; joining with IP address works


Recommended Posts

Posted (edited)

When a player joins a server using an IP address, for example 87.94.161.165, they are taken to the coalition and slot selection screen normally.

When a player joins a server using a DNS name, which for the aforementioned server is k01.dcsfinland.fi, they are thrown into spectator view. If the player presses escape and chooses "select role", they are thrown into the map with the top left corner showing a placeholder name and the Angolan flag. The main log file will show the following error:

2024-11-23 21:12:49.492 ERROR   LuaGUI (Main): [string "./Scripts/UI/MultiplayerSelectRoleMap/MultiplayerSelectRole.lua"]:247: bad argument #1 to 'match' (string expected, got nil)

 

The root cause is in the isWhiteIp function that expects to get a valid IP address but raises an error when given a DNS name. In addition to fixing the server address parsing issue I'd probably do away with the IP address range check inside the UI scripts and move it to the builtin GeoIP database instead, but hey, I'm not your software architect 😁.

I'm pretty sure no trackfile will be required for this bug report.

 

Edited by andyn
  • Like 1
Posted

A user reported this issue on the Flashpoint Levant server. They were unable to see the slot menu after connecting through the server browser or using the DNS name eu.limakilo.net. They were able to slot in after using the IPv4 address.

  • Like 1
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...