* failed plugins (3) line stacktrace
BoxLooters.cs 179:92 Operator '.' cannot be applied to operand of type 'void'
Does not compile after 6-Mar updateSolved
Here's a quick patch for this:
--- BoxLooters.cs.orig 2025-01-03 22:34:13.667307300 +0800
+++ BoxLooters.cs 2025-03-19 22:14:42.320529800 +0800
@@ -176,7 +176,9 @@
string response1 = string.Empty;
string response2 = string.Empty;
- foreach (LootList.LootEntry data in box.lootList.GetLooters().Reverse().Take(10))
+ var lootersArray = box.lootList.GetLooters();
+ Array.Reverse(lootersArray);
+ foreach (LootList.LootEntry data in lootersArray.Take(10))
{
string respString = string.Format(msg("DetectedLooters", player.userID), i, data.userName, data.userId, data.firstLoot, data.lastLoot);
if (i < 6) response1 += respString;
@@ -197,7 +199,9 @@
int i = 1;
string response1 = string.Empty;
string response2 = string.Empty;
- foreach (LootList.LootEntry data in playerData.players[entityId].lootList.GetLooters().Reverse().Take(10))
+ var lootersArray = playerData.players[entityId].lootList.GetLooters();
+ Array.Reverse(lootersArray);
+ foreach (LootList.LootEntry data in lootersArray.Take(10))
{
string respString = string.Format(msg("DetectedLooters", player.userID), i, data.userName, data.userId, data.firstLoot, data.lastLoot);
if (i < 6) response1 += respString;
Hey @dtucny thanks for posting the diff. I just tested it and it appears to work just fine. Thank you so much! 👍
dtucnyHere's a quick patch for this:
--- BoxLooters.cs.orig 2025-01-03 22:34:13.667307300 +0800 +++ BoxLooters.cs 2025-03-19 22:14:42.320529800 +0800 @@ -176,7 +176,9 @@ string response1 = string.Empty; string response2 = string.Empty; - foreach (LootList.LootEntry data in box.lootList.GetLooters().Reverse().Take(10)) + var lootersArray = box.lootList.GetLooters(); + Array.Reverse(lootersArray); + foreach (LootList.LootEntry data in lootersArray.Take(10)) { string respString = string.Format(msg("DetectedLooters", player.userID), i, data.userName, data.userId, data.firstLoot, data.lastLoot); if (i < 6) response1 += respString; @@ -197,7 +199,9 @@ int i = 1; string response1 = string.Empty; string response2 = string.Empty; - foreach (LootList.LootEntry data in playerData.players[entityId].lootList.GetLooters().Reverse().Take(10)) + var lootersArray = playerData.players[entityId].lootList.GetLooters(); + Array.Reverse(lootersArray); + foreach (LootList.LootEntry data in lootersArray.Take(10)) { string respString = string.Format(msg("DetectedLooters", player.userID), i, data.userName, data.userId, data.firstLoot, data.lastLoot); if (i < 6) response1 += respString;
thanks!
i patched this 1 by just removing the Reverse() and the Take(10) parts of line 179 and line 200. works in carbon too now.
Locked automatically