No overload for method `OnRepairFailed' takes `0' argumentsError
Trillz

HandyMan - Failed to compile: HandyMan.cs(295,28): error CS1501: No overload for method `OnRepairFailed' takes `0' arguments

Arainrr

Delete all "entity.OnRepairFailed()" in .cs
hamstar
nearly same error just mine says 1 arguments instead of 0
RyanFromRust

Same here:

Error while compiling: HandyMan.cs(295,28): error CS1501: No overload for method `OnRepairFailed' takes `0' arguments

I unloaded HandyMan, removed the OnRepairFailed lines from the .cs like Arainrr said to do, and it loaded up without error.

hamstar
5d66db4201195.jpg?uid=5d66db72ac9cd RyanFromRust

Same here:

Error while compiling: HandyMan.cs(295,28): error CS1501: No overload for method `OnRepairFailed' takes `0' arguments

I unloaded HandyMan, removed the OnRepairFailed lines from the .cs like Arainrr said to do, and it loaded up without error.

thanks for the pic, i actually missed one. and once i seen ur pic and removed the last one. it it worked perfectly! thank you!

rostov114

Simle fix.

Replace:
entity.OnRepairFailed();​

to

entity.OnRepairFailed(null, null);


Merged post

Full fix:

            if (entity.SecondsSinceAttacked <= lastAttackLimit)
            {
                entity.OnRepairFailed();
                return false;
            }​
to
            if (entity.SecondsSinceAttacked <= lastAttackLimit)
            {
                entity.OnRepairFailed(player, string.Format("Unable to repair: Recently damaged. Repairable in: {0:N0}s.", lastAttackLimit - entity.SecondsSinceAttacked));
                return false;
            }​

===

            if (num <= 0f || num2 <= 0f)
            {
                entity.OnRepairFailed();
                return false;
            }​
to
            if (num <= 0f || num2 <= 0f)
            {
                entity.OnRepairFailed(player, "Unable to repair: Not damaged.");
                return false;
            }​

===

                if (num4 <= 0f)
                {
                    entity.OnRepairFailed();
                    return false;
                }
to
                if (num4 <= 0f)
                {
                    entity.OnRepairFailed(player, "Unable to repair: Insufficient resources.");
                    return false;
                }​