Skip to content
RustPluginGenerator
Runtime errorOxide + Carbon

Fix "Version `1.2` is invalid ... should be `major.minor.patch`" (Oxide)

Oxide rejects a plugin whose [Info] Version string does not have three numeric parts. The loader refuses to load it until Version reads like 1.2.0 instead of 1.2.

Server console
Version `1.2` is invalid for Better Loot, should be `major.minor.patch`

Why it happens

The [Info] attribute's Version argument is parsed as a System.Version when the plugin is loaded. System.Version requires a major, minor and build component, so a two-part string such as 1.2, 2.0 or a bare 1 throws and the loader prints the message naming the plugin title and the offending value.

Common triggers:

  • You typed [Info("Better Loot", "Author", "1.2")] out of habit from other platforms that accept two-part versions.
  • A version control tag like v1.3 or 1.3-beta was pasted in verbatim.
  • Copying a version from a changelog where the patch number was dropped.

The check happens before compilation of the class's logic matters for loading, so the plugin never reaches the loaded state and no hooks fire.

How to fix it

  1. Open the plugin's .cs file in oxide/plugins (or carbon/plugins).
  2. Find the [Info(...)] line at the top of the class.
  3. Rewrite the third argument so it has exactly three dot-separated numbers: "1.2.0". Drop any leading v, pre-release suffix or fourth component.
  4. Save the file. Oxide reloads on save; you should see Loaded plugin Better Loot v1.2.0 by RustPluginGenerator and the invalid-version line disappears.
  5. If it still fails, run oxide.reload BetterLoot from the server console to force a reload and read the full message again.

If you version plugins properly, bump the patch number on every change (1.2.0, 1.2.1) so the console log tells you which build is live.

Before and after

BeforeFails
using Oxide.Core.Plugins;

namespace Oxide.Plugins
{
    [Info("Better Loot", "RustPluginGenerator", "1.2")]
    [Description("Multiplies loot amounts from server crates.")]
    public class BetterLoot : RustPlugin
    {
        private const float Multiplier = 2f;

        private void OnLootSpawn(LootContainer container)
        {
            if (container == null || container.inventory == null)
            {
                return;
            }

            foreach (var item in container.inventory.itemList)
            {
                if (item == null)
                {
                    continue;
                }

                item.amount = (int)(item.amount * Multiplier);
                item.MarkDirty();
            }
        }
    }
}
AfterFixed
using Oxide.Core.Plugins;

namespace Oxide.Plugins
{
    [Info("Better Loot", "RustPluginGenerator", "1.2.0")]
    [Description("Multiplies loot amounts from server crates.")]
    public class BetterLoot : RustPlugin
    {
        private const float Multiplier = 2f;

        private void OnLootSpawn(LootContainer container)
        {
            if (container == null || container.inventory == null)
            {
                return;
            }

            foreach (var item in container.inventory.itemList)
            {
                if (item == null)
                {
                    continue;
                }

                item.amount = (int)(item.amount * Multiplier);
                item.MarkDirty();
            }
        }
    }
}

FAQ

Are four-part versions like 1.2.0.0 accepted?

Yes. System.Version parses four numeric parts, so 1.2.0.0 loads. Three parts is the convention Oxide prints in the loaded message and the safest choice for compatibility with Carbon and third-party tooling, so prefer 1.2.0.

Why does the message name 'Better Loot' instead of the file name?

The loader reads the title from the [Info] attribute before the class is compiled for loading. If the title and file name differ, Oxide separately warns that the file name should match the main class; that is a different message from this one.

Does the version string affect hook dispatch or saved data?

No. The version is only metadata used in log lines such as Failed to call hook ... on plugin 'Better Loot v1.2.0'. Config and data files are keyed by the plugin name, so changing the version does not orphan them.

What happens to the plugin while the version is invalid?

It is not loaded: no hooks, chat commands or permissions are registered. Fixing the string and saving the file triggers a fresh load attempt, and the console prints Loaded plugin ... once it succeeds.

Different error?

Paste the full console output and get the cause and a fix in plain English.

Open the error explainer

Skip the debugging

Generated plugins are compiled before you get them, and compiler errors are fixed automatically.

Generate a plugin

2 free plugins a month, no card.

Last updated Oct 26, 2026.

Get plugins that compile first time

Generate