Skip to content

Commit

Permalink
Warning fix
Browse files Browse the repository at this point in the history
  • Loading branch information
schwarper authored Jul 9, 2024
1 parent fd34da0 commit 6ac81fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Store_Modules/Store_Crash/cs2-store-crash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public void Command_Crash(CCSPlayerController? player, CommandInfo info)

private void StartCrashGame(CCSPlayerController player, int credits, float targetMultiplier, float crashMultiplier)
{
StoreApi.GivePlayerCredits(player, -credits);
StoreApi!.GivePlayerCredits(player, -credits);
player.PrintToChat(Localizer["Bet placed", credits, targetMultiplier]);

var game = new CrashGame(player, credits, targetMultiplier, crashMultiplier);
Expand Down Expand Up @@ -168,7 +168,7 @@ private void EndCrashGame(CrashGame game)
if (actualMultiplier >= targetMultiplier)
{
int winnings = (int)(game.BetCredits * targetMultiplier);
StoreApi.GivePlayerCredits(game.Player, winnings);
StoreApi!.GivePlayerCredits(game.Player, winnings);
game.Player.PrintToChat(Localizer["Bet win", winnings.ToString(), targetMultiplier.ToString("0.00"), actualMultiplier.ToString("0.00")]);
}
else
Expand Down
6 changes: 6 additions & 0 deletions cs2-store.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "cs2-store-coinflip", "Store
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "cs2-store-quiz", "Store_Modules\Store_Quiz\cs2-store-quiz.csproj", "{F8265845-FD60-4ED3-83EA-5B01D615BADA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "cs2-store-crash", "Store_Modules\Store_Crash\cs2-store-crash.csproj", "{DF274969-3DF7-46C2-91E3-87C5EF6A8385}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -51,6 +53,10 @@ Global
{F8265845-FD60-4ED3-83EA-5B01D615BADA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F8265845-FD60-4ED3-83EA-5B01D615BADA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F8265845-FD60-4ED3-83EA-5B01D615BADA}.Release|Any CPU.Build.0 = Release|Any CPU
{DF274969-3DF7-46C2-91E3-87C5EF6A8385}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DF274969-3DF7-46C2-91E3-87C5EF6A8385}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DF274969-3DF7-46C2-91E3-87C5EF6A8385}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DF274969-3DF7-46C2-91E3-87C5EF6A8385}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit 6ac81fb

Please sign in to comment.