i keep getting this error and i have no clue what it is causing it. here is the code
void EliminatePlayer(BasePlayer player)
{
if (isStarted && microplayers.Contains(player))
{
Item bnoc = ItemManager.CreateByItemID(-1262185308);
Item bnoc2 = ItemManager.CreateByItemID(-1266045928);
if (bnoc == null || bnoc2 == null)
{
}
else
{
bnoc.MoveToContainer(player.inventory.containerBelt);
bnoc2.MoveToContainer(player.inventory.containerWear);
player.inventory.containerBelt.SetLocked(true);
player.inventory.containerWear.SetLocked(true);
}
microplayers.Remove(player);
if (microa.Count == 0)
{
GameEnd();
}
}
}
void GameEnd()
{
foreach(BaseEntity entity in microbuildingblocks)
{
entity.Kill();
}
}
void OnTick()
{
foreach(BasePlayer player in microplayers)
{
if(player.IsSwimming())
{
EliminatePlayer(player);
}
}
}