Jump to content

not compiling after update

Pending 2.11.4

Tage2
Tage2

Posted

169 StaticLootables - Failed to compile: Cannot implicitly convert type 'System.Func<Item, int, bool>' to 'System.Func<BasePlayer, Item, int, bool>' | Line: 1828, Pos: 33

Gives that error

rustfoxgaming

Posted

(20:37:43) | Error while compiling StaticLootables: Cannot implicitly convert type 'System.Func<Item, int, bool>' to 'System.Func<BasePlayer, Item, int, bool>' | Line: 1828, Pos: 33 

Tage2

Posted

Folks really love the loot we put in the static lootable items.   I hope it's not too long or too hard  to update.

AntonescuPaul87

Posted

In line 1828 and 1873:
replace " Container.canAcceptItem = new System.Func<Item, int, bool>((item, slot) => false); " with " Container.canAcceptItem = new System.Func<BasePlayer, Item, int, bool>((player, item, slot) => false); "

Then in Line 1921:
replace the " target.contents.canAcceptItem = (_, _) => true; " with " target.contents.canAcceptItem = (_, _, _) => true; "

I attached the repaired Plugin.

Have Fun

StaticLootables.cs

Wild Shadow

Posted

same 

StaticLootables - Failed to compile: Cannot implicitly convert type 'System.Func<Item, int, bool>' to 'System.Func<BasePlayer, Item, int, bool>' | Line: 1828, Pos: 33

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
3m
Total downloads
Customers
12k
Customers served
Files Sold
170.5k
Total sales
Payments
3.7m
Processed total
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.