Skip to content

Commit

Permalink
Fixed error with database
Browse files Browse the repository at this point in the history
  • Loading branch information
NaathySz authored Aug 16, 2024
1 parent 006a39b commit b8f7be1
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions cs2-store-salary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class SalaryConfig
public class Store_Salary : BasePlugin, IPluginConfig<Store_SalaryConfig>
{
public override string ModuleName => "Store Module [Salary]";
public override string ModuleVersion => "0.0.1";
public override string ModuleVersion => "0.0.2";
public override string ModuleAuthor => "Nathy";

public IStoreApi? StoreApi { get; set; }
Expand Down Expand Up @@ -175,6 +175,14 @@ LastClaim DATETIME NOT NULL

private string GetConnectionString()
{
return $"Server={Config.DatabaseHost};Port={Config.DatabasePort};Database={Config.DatabaseName};Uid={Config.DatabaseUser};Pwd={Config.DatabasePassword};";
var builder = new MySqlConnectionStringBuilder
{
Server = Config.DatabaseHost,
Port = (uint)Config.DatabasePort,
Database = Config.DatabaseName,
UserID = Config.DatabaseUser,
Password = Config.DatabasePassword
};
return builder.ConnectionString;
}
}
}

0 comments on commit b8f7be1

Please sign in to comment.