MySqlConnector.MySqlException (0x80004005): Parameter '@CountPlay' must be defined. To use this as a variable, set 'Allow User Variables=true' in the connection string.
   at MySqlConnector.Core.StatementPreparer.GetParameterIndex(String name) in /_/src/MySqlConnector/Core/StatementPreparer.cs:line 42
   at MySqlConnector.Core.StatementPreparer.ParameterSqlParser.OnNamedParameter(Int32 index, Int32 length) in /_/src/MySqlConnector/Core/StatementPreparer.cs:line 63
   at MySqlConnector.Core.SqlParser.Parse(String sql) in /_/src/MySqlConnector/Core/SqlParser.cs:line 201
   at MySqlConnector.Core.StatementPreparer.ParseAndBindParameters(ByteBufferWriter writer) in /_/src/MySqlConnector/Core/StatementPreparer.cs:line 32
   at MySqlConnector.Core.SingleCommandPayloadCreator.WriteCommand(IMySqlCommand command, ByteBufferWriter writer, Boolean appendSemicolon, Boolean isFirstCommand, Boolean isLastCommand) in /_/src/MySqlConnector/Core/SingleCommandPayloadCreator.cs:line 266
   at MySqlConnector.Core.SingleCommandPayloadCreator.WriteQueryCommand(CommandListPosition& commandListPosition, IDictionary`2 cachedProcedures, ByteBufferWriter writer, Boolean appendSemicolon) in /_/src/MySqlConnector/Core/SingleCommandPayloadCreator.cs:line 45
   at MySqlConnector.Core.CommandExecutor.ExecuteReaderAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, CommandBehavior behavior, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/CommandExecutor.cs:line 42
   at MySqlConnector.MySqlCommand.ExecuteNonQueryAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlCommand.cs:line 309
   at Dapper.SqlMapper.ExecuteImplAsync(IDbConnection cnn, CommandDefinition command, Object param) in /_/Dapper/SqlMapper.Async.cs:line 662
   at Ranks_ExStats_Maps.RanksExStatsMaps.SavePlayerDataAsync(Int32 slot, String steamId) in E:\github\cs2-ranks\Ranks\Modules\Ranks_ExStats_Maps\Ranks_ExStats_Maps.cs:line 402
   at Ranks_ExStats_Maps.RanksExStatsMaps.SavePlayerDataAsync(Int32 slot, String steamId) in E:\github\cs2-ranks\Ranks\Modules\Ranks_ExStats_Maps\Ranks_ExStats_Maps.cs:line 403


private async Task SavePlayerDataAsync(int slot, string steamId)
    {
        try
        {
            await using var connection = new MySqlConnection(_api?.DatabaseConnectionString);
            await connection.OpenAsync();

            var query = $"""
                         UPDATE `%s_maps` 
                         SET `countplays` = @CountPlay, 
                             `kills` = @Kills, 
                             `deaths` = @Deaths, 
                             `rounds_overall` = @RoundsOverall, 
                             `rounds_ct` = @RoundCt, 
                             `rounds_t` = @RoundT, 
                             `bomb_planted` = @BombPlanted, 
                             `bomb_defused` = @BombDefused, 
                             `hostage_rescued` = @HostageRescued, 
                             `hostage_killed` = @HostageKilled, 
                             `playtime` = @Time 
                         WHERE `steam` = '{steamId}' AND `name_map` = '{(string.IsNullOrEmpty(_currentMapName) ? Server.MapName : _currentMapName)}';
                         """;

            await connection.ExecuteAsync(query, _playersData[slot]);
        }
        catch (Exception e)
        {
            Console.WriteLine(e);
        }
    }