Compiling error
this is because you use carbon. ill private message you how i fixed it to work on my test server
change line 179 and line 200 to display only this
foreach (LootList.LootEntry data in box.lootList.GetLooters())
removing the Reverse() and the Take(10), this will allow it to compile while in carbon, without loss of functionality
Thank you very much for responding. I saw a fix for this a bit ago and it seems to be working....maybe the same fix because I remember having to change a couple of lines like this. I appreciate the response. You're a champ!
So i did your suggested fix and the issue seems to have just moved to another problem now.
(14:10:33) | Failed compiling 'BoxLooters.cs':
(14:10:33) | 1. Operator '.' cannot be applied to operand of type 'void' [CS0023]
(BoxLooters 92 line 179)
(14:11:17) | [Admin] Downloaded BoxLooters
(14:11:18) | Failed compiling 'BoxLooters.cs':
(14:11:18) | 1. Operator '.' cannot be applied to operand of type 'void' [CS0023]
(BoxLooters 92 line 179)
(14:11:26) | Checking for new Steam Item Definitions..
(14:13:25) | Failed compiling 'BoxLooters.cs':
(14:13:25) | 1. The name 'box' does not exist in the current context [CS0103]
(BoxLooters 57 line 200)
(14:13:36) | Requested 'BoxLooters' for compilation
(14:13:37) | Failed compiling 'BoxLooters.cs':
(14:13:37) | 1. The name 'box' does not exist in the current context [CS0103]
(BoxLooters 57 line 200)
clumsyzombie
So i did your suggested fix and the issue seems to have just moved to another problem now.
(14:10:33) | Failed compiling 'BoxLooters.cs':
(14:10:33) | 1. Operator '.' cannot be applied to operand of type 'void' [CS0023]
(BoxLooters 92 line 179)
(14:11:17) | [Admin] Downloaded BoxLooters
(14:11:18) | Failed compiling 'BoxLooters.cs':
(14:11:18) | 1. Operator '.' cannot be applied to operand of type 'void' [CS0023]
(BoxLooters 92 line 179)
(14:11:26) | Checking for new Steam Item Definitions..
(14:13:25) | Failed compiling 'BoxLooters.cs':
(14:13:25) | 1. The name 'box' does not exist in the current context [CS0103]
(BoxLooters 57 line 200)
(14:13:36) | Requested 'BoxLooters' for compilation
(14:13:37) | Failed compiling 'BoxLooters.cs':
(14:13:37) | 1. The name 'box' does not exist in the current context [CS0103]
(BoxLooters 57 line 200)
foreach (LootList.LootEntry data in playerData.players[entityId].lootList.GetLooters();
you are right, line 200 should be this, my fault
So
Line 179 should be foreach (LootList.LootEntry data in box.lootList.GetLooters())
Line 200 should be foreach (LootList.LootEntry data in playerData.players[entityId].lootList.GetLooters();
Tacman
foreach (LootList.LootEntry data in playerData.players[entityId].lootList.GetLooters();
you are right, line 200 should be this, my fault
So i did that and got more errors
(11:38:37) | Failed compiling 'BoxLooters.cs':
(11:38:37) | 1. ) expected [CS1026]
(BoxLooters 107 line 200)
(11:38:37) | 2. The name 'data' does not exist in the current context [CS0103]
(BoxLooters 101 line 202)

This is what the method should look like, it compiles fine on carbon and oxide too
private void ReplyInfo(BasePlayer player, ulong entityId, bool isPlayer = false, string additional = "")
{
string entId = entityId.ToString();
if (!string.IsNullOrEmpty(additional))
entId = $"{additional} - {entityId}";
if (!isPlayer)
{
if (boxData.boxes.ContainsKey(entityId))
{
BoxData box = boxData.boxes[entityId];
SendReply(player, string.Format(msg("BoxInfo", player.userID), entId));
if (!string.IsNullOrEmpty(box.killerName))
SendReply(player, string.Format(msg("DetectDestr", player.userID), box.killerName, box.killerId));
int i = 1;
string response1 = string.Empty;
string response2 = string.Empty;
foreach (LootList.LootEntry data in box.lootList.GetLooters())
{
string respString = string.Format(msg("DetectedLooters", player.userID), i, data.userName, data.userId, data.firstLoot, data.lastLoot);
if (i < 6) response1 += respString;
else response2 += respString;
i++;
}
SendReply(player, response1);
SendReply(player, response2);
}
else SendReply(player, string.Format(msg("NoLooters", player.userID), entId));
}
else
{
if (playerData.players.ContainsKey(entityId))
{
SendReply(player, string.Format(msg("PlayerData", player.userID), entId));
int i = 1;
string response1 = string.Empty;
string response2 = string.Empty;
foreach (LootList.LootEntry data in playerData.players[entityId].lootList.GetLooters())
{
string respString = string.Format(msg("DetectedLooters", player.userID), i, data.userName, data.userId, data.firstLoot, data.lastLoot);
if (i < 6) response1 += respString;
else response2 += respString;
i++;
}
SendReply(player, response1);
SendReply(player, response2);
}
else SendReply(player, string.Format(msg("NoLootersPlayer", player.userID), entId));
}
} Tacman
This is what the method should look like, it compiles fine on carbon and oxide too
private void ReplyInfo(BasePlayer player, ulong entityId, bool isPlayer = false, string additional = "") { string entId = entityId.ToString(); if (!string.IsNullOrEmpty(additional)) entId = $"{additional} - {entityId}"; if (!isPlayer) { if (boxData.boxes.ContainsKey(entityId)) { BoxData box = boxData.boxes[entityId]; SendReply(player, string.Format(msg("BoxInfo", player.userID), entId)); if (!string.IsNullOrEmpty(box.killerName)) SendReply(player, string.Format(msg("DetectDestr", player.userID), box.killerName, box.killerId)); int i = 1; string response1 = string.Empty; string response2 = string.Empty; foreach (LootList.LootEntry data in box.lootList.GetLooters()) { string respString = string.Format(msg("DetectedLooters", player.userID), i, data.userName, data.userId, data.firstLoot, data.lastLoot); if (i < 6) response1 += respString; else response2 += respString; i++; } SendReply(player, response1); SendReply(player, response2); } else SendReply(player, string.Format(msg("NoLooters", player.userID), entId)); } else { if (playerData.players.ContainsKey(entityId)) { SendReply(player, string.Format(msg("PlayerData", player.userID), entId)); int i = 1; string response1 = string.Empty; string response2 = string.Empty; foreach (LootList.LootEntry data in playerData.players[entityId].lootList.GetLooters()) { string respString = string.Format(msg("DetectedLooters", player.userID), i, data.userName, data.userId, data.firstLoot, data.lastLoot); if (i < 6) response1 += respString; else response2 += respString; i++; } SendReply(player, response1); SendReply(player, response2); } else SendReply(player, string.Format(msg("NoLootersPlayer", player.userID), entId)); } }
This is from what line to what line?
clumsyzombie
This is from what line to what line?
replace the whole method ReplyInfo with what i pasted, it works even in oxide