Jump to content

Compiling error after force wipe

Closed 1.0.2

deadpixël
deadpixël

Posted

The plugin isnt working after the Augusts force wipe.

 

Failed compiling 'CombinedStorage.cs':
  1. Argument 1: cannot convert from 'method group' to 'System.Action' [CS1503]
     (CombinedStorage 29 line 1273)

 

Markiii

Posted

3 edits:

Line ~991, replace:

private Timer RefreshStorageDebounceTimer = null;

with:

private Action RefreshStorageDebounceTimerDestroy = null;

 

Just below it, replace the whole QueueRefreshStorageItems method with:

public void QueueRefreshStorageItems( ItemContainerId? containerId, float delay ) { RefreshStorageDebounceTimerDestroy?.Invoke(); RefreshStorageForContainers.Add(containerId); var refreshT = INSTANCE.timer.In(delay, () => { if (!StorageContainers.Any(x => RefreshStorageForContainers.Any(y => y?.Value == x.inventory.uid.Value))) { return; } RefreshStorageForContainers.Clear(); RefreshStorage(onlyItems: true); }); RefreshStorageDebounceTimerDestroy = () => refreshT.Destroy(); }

 

Line ~1273, replace:

fakeStorage.CancelInvoke(fakeStorage.DecayTick);

with:

fakeStorage.decay = null;

Then reload. (If they get an error on a Dictionary<string, Timer> line near the bottom, delete that line — it's unused.)

  • Love 2
ChardaZAR

Posted

Just now, Markiii said:

3 edits:

Line ~991, replace:

private Timer RefreshStorageDebounceTimer = null;

with:

private Action RefreshStorageDebounceTimerDestroy = null;

 

Just below it, replace the whole QueueRefreshStorageItems method with:

public void QueueRefreshStorageItems( ItemContainerId? containerId, float delay ) { RefreshStorageDebounceTimerDestroy?.Invoke(); RefreshStorageForContainers.Add(containerId); var refreshT = INSTANCE.timer.In(delay, () => { if (!StorageContainers.Any(x => RefreshStorageForContainers.Any(y => y?.Value == x.inventory.uid.Value))) { return; } RefreshStorageForContainers.Clear(); RefreshStorage(onlyItems: true); }); RefreshStorageDebounceTimerDestroy = () => refreshT.Destroy(); }

 

Line ~1273, replace:

fakeStorage.CancelInvoke(fakeStorage.DecayTick);

with:

fakeStorage.decay = null;

Then reload. (If they get an error on a Dictionary<string, Timer> line near the bottom, delete that line — it's unused.)

You're a gentleman and a scholar 

  • Love 1
Mr01sam

Posted

I will take a look - sorry for the delay

  • Like 1
  • Love 1
Mr01sam

Posted

Changed Status from Pending to Closed

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.6k
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.