Compilation error on Carbon framework for v2.14.1 [Fixed in v2.14.2]Fixed

Failed compiling 'CustomVendingSetup.cs':
1. An object reference is required for the non-static field, method, or property 'RustPlugin.Server' [CS0120]
(CustomVendingSetup 64 line 3688)

Confirmed here

I am also getting this error but on several carbon servers

same here.
Failed compiling 'CustomVendingSetup.cs':
1. An object reference is required for the non-static field, method, or property 'RustPlugin.Server' [CS0120]
(CustomVendingSetup 64 line 3688)

Carbon issue. Not able to patch this right now, but you can delete the line of code that is offending to get it to compile, only impact is that if you reset a water well vendor to default/vanilla, it won't re-enable rotating stock on that vendor.

a fix was posted on the carbon discord by snapple

Fix:
invisibleVendingMachine.nextOrderRefresh = Server.waterWellNpcSalesRefreshFrequency * 60f * 60f;
to
invisibleVendingMachine.nextOrderRefresh = ConVar.Server.waterWellNpcSalesRefreshFrequency * 60f * 60f;

TuxGeek

a fix was posted on the carbon discord by snapple

Fix:
invisibleVendingMachine.nextOrderRefresh = Server.waterWellNpcSalesRefreshFrequency * 60f * 60f;
to
invisibleVendingMachine.nextOrderRefresh = ConVar.Server.waterWellNpcSalesRefreshFrequency * 60f * 60f;

Thanks for posting this here. Fixed it for me and plugin has compiled successfully :)

Thanks, fix worked for us as well :)

Locked automatically