Jump to content

Force Wipe - Error

Fixed 2.1.6

HighOnTek
HighOnTek

Posted

Running today's latest version, there are issues.

Error while compiling WelcomeController: 'BasePlayer' does not contain a definition for 'AsIPlayer' and no accessible extension method 'AsIPlayer' accepting a first argument of type 'BasePlayer' could be found (are you missing a using directive or an assembly reference?) | Line: 53, Pos: 49

HighOnTek

Posted

Fixed mine so it at least compiles while we wait for a permanent solution / updated version.

BEFORE
textLine = textLine.Replace("{playerName}", player.displayName)
    .Replace("{playerId}", player.UserIDString)
    .Replace("{playerPing}", player.AsIPlayer().Ping.ToString())
    .Replace("{playerCulture}", player.AsIPlayer().Language.TwoLetterISOLanguageName)
    .Replace("{playerIP}", player.net.connection.ipaddress)
    .Replace("{playerHealth}", player.health.ToString("F0"));

AFTER (WORKS)
textLine = textLine.Replace("{playerName}", player.displayName)
    .Replace("{playerId}", player.UserIDString)
    .Replace("{playerPing}", player.net?.connection?.GetAveragePing()?.ToString() ?? "0")
    .Replace("{playerCulture}", "en")
    .Replace("{playerIP}", player.net.connection.ipaddress)
    .Replace("{playerHealth}", player.health.ToString("F0"));

 

shady14u

Posted

Changed Status from Pending to Fixed

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
2.6m
Total downloads
Customers
11.3k
Customers served
Files Sold
162.1k
Total sales
Payments
3.5m
Processed total
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.