I am getting this error when i run my code: error CS1525: Unexpected symbol `void', expecting `,', `;', or `='
Here is my code: (Error is in the code!)
private void ManageScores(BasePlayer player)
{
var bPoints = points.BlueTeamPoints;
var rPoints = points.RedTeamPoints;
bool BlueWinning()
{
if (bPoints == 100 && bPoints > rPoints)
{
return true;
}
return false;
}
bool RedWinning()
{
if (rPoints == 100 && rPoints > bPoints)
{
return true;
}
return false;
}
if (BlueWinning() == true)
{
EndKoth(player);
return;
}
else if (RedWinning() == true)
{
EndKoth(player);
return;
}
}
private void EndKoth(BasePlayer player)
{
Server.Broadcast("Ending the KOTH game!"); // KOTH.cs(260,15): error CS1525: Unexpected symbol `void', expecting `,', `;', or `='
if (TeamExists(bteamID))
{
var bteam = RelationshipManager.ServerInstance.FindTeam(bteamID);
bteam.Disband();
}
if (TeamExists(rteamID))
{
var rteam = RelationshipManager.ServerInstance.FindTeam(rteamID);
rteam.Disband();
}
else return;
Puts("Game Ending!");
foreach (var p in BasePlayer.activePlayerList)
{
p.Teleport(Spawn);
Server.Broadcast("KOTH Ended!");
p.Team.RemovePlayer(p.userID);
foreach (var i in p.inventory.AllItems())
{
i.Remove();
}
timer.Once(100f, () =>
{
startKoth(player);
showLeaderboard(player);
});
gameRunning = false;
}
}