© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
2 replies
DarinForTheWin

My test code doesnt work.. confused

So, this code was a test work (followed a tutorial made a few days ago) for a game called "lethal company" The function of the code IN THEORY, would be every frame, the speed meter (which is how long you can sprint) Would be reset to the max, meaning basically infinite sprint. Im having some issues and for some reason it is not working.. Even though a coding friend of mine does not see any issues with it..

using BepInEx;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BepInEx.Logging;
using Bombastic_Company.Patches;
using HarmonyLib;

namespace Bombastic_Company
{
    [BepInPlugin(modGUID, modName, modVersion)]
    public class BombasticCompanyBase : BaseUnityPlugin
    {
        private const string modGUID = "DFISH.BombasticCompany";
        private const string modName = "Bombastic Company";
        private const string modVersion = "1.0.0.0";

        private readonly Harmony harmony = new Harmony(modGUID);

        private static BombasticCompanyBase Instance;

        internal ManualLogSource mls;



        void Awake()
        {
            if (Instance == null)
            {
                Instance = this;

            }
            mls = BepInEx.Logging.Logger.CreateLogSource(modGUID);

            mls.LogInfo("Lethal Company has engaged Bombastic Mode");

            harmony.PatchAll(typeof(BombasticCompanyBase));
            harmony.PatchAll(typeof(PlayerControllerBPatch));
        }


    }
}
using BepInEx;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BepInEx.Logging;
using Bombastic_Company.Patches;
using HarmonyLib;

namespace Bombastic_Company
{
    [BepInPlugin(modGUID, modName, modVersion)]
    public class BombasticCompanyBase : BaseUnityPlugin
    {
        private const string modGUID = "DFISH.BombasticCompany";
        private const string modName = "Bombastic Company";
        private const string modVersion = "1.0.0.0";

        private readonly Harmony harmony = new Harmony(modGUID);

        private static BombasticCompanyBase Instance;

        internal ManualLogSource mls;



        void Awake()
        {
            if (Instance == null)
            {
                Instance = this;

            }
            mls = BepInEx.Logging.Logger.CreateLogSource(modGUID);

            mls.LogInfo("Lethal Company has engaged Bombastic Mode");

            harmony.PatchAll(typeof(BombasticCompanyBase));
            harmony.PatchAll(typeof(PlayerControllerBPatch));
        }


    }
}


And the second part of the code doesnt fit so ill put it in the comments
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ The code doesnt work as intended
C#CC# / help
2y ago
string doesnt work?
C#CC# / help
4y ago
✅ my code dose not work
C#CC# / help
3y ago
For-Loop doesnt work.
C#CC# / help
3y ago