Type `ItemContainer' does not contain a definition for `CanTake'Fixed

After the force update today i'm now getting this error when loading the plugin -

 

Error while compiling: NPCDropGun.cs(172,50): error CS1061: Type `ItemContainer' does not contain a definition for `CanTake' and no extension method `CanTake' of type `ItemContainer' could be found. Are you missing an assembly reference?

Confirmed getting same error.

Temp fix is to comment out this bit of code
What it looks like it is doing is checking if the item can not take the attachment. If it cant take the attachment then it continues instead of applying it to the weapon.

So some unexpected stuff might happen with that line commented out like 8X on a knife.

!item.contents.CanTake(attachmentItem))​

 

I tried that and it now says -

 

Error while compiling: NPCDropGun.cs(173,4): error CS1525: Unexpected symbol `{'



Merged post

Figured it out, somehow i didnt notice i accidentally made it if (attachmentItem == null //

 

Changed to if (attachmentItem == null);  and it fixed it

 

Thank you!

Fixed in the latest update. Method was renamed in Rust from CanTake to CanAccept.

Locked automatically