nanoblox / core

https://nanoblox.github.io/core/
Mozilla Public License 2.0
56 stars 17 forks source link

custom commands don't work #67

Closed DarthMDev closed 3 years ago

DarthMDev commented 3 years ago

I've been trying to get them to work and they just won't. They used to work but I believe some update broke them or something.

1ForeverHD commented 3 years ago

Custom commands appear to be working fine with the latest loader, can you provide more details?

image

image

DarthMDev commented 3 years ago

How do I get the latest loader ? I inserted the latest model of hd admin and still have issues . It says invalid command when trying to use

DarthMDev commented 3 years ago

this is an example of one of my commands:


        Name = "setwave";
        Aliases = {'waveset'};
        Prefixes = {settings.Prefix};
        Rank = 3;
        RankLock = false;
        Loopable = false;
        Tags = {'debug','abusive'};
        Description = "Used to set the wave value to a number";
        Contributors = {};
        --
        Args = {'Number'};
        Function = function(speaker, args)
            game.Workspace.Wave.Value = tonumber(args[1])

        end;
        --
    };
1ForeverHD commented 3 years ago

This appears to work fine:

image

Are your command tables structured correctly?

Here's what I'm doing:

-- << RETRIEVE FRAMEWORK >>
local main = _G.HDAdminMain
local settings = main.settings

-- << COMMANDS >>
local module = {

    -----------------------------------
    {
    Name = "setwave";
    Aliases = {'waveset'};
    Prefixes = {settings.Prefix};
    Rank = 3;
    RankLock = false;
    Loopable = false;
    Tags = {'debug','abusive'};
    Description = "Used to set the wave value to a number";
    Contributors = {};
    --
    Args = {'Number'};
    Function = function(speaker, args)
        game.Workspace.Wave.Value = tonumber(args[1])

    end;
    --
    };

    -----------------------------------

};

return module
DarthMDev commented 3 years ago

yeah thats basically how my script looks except I have more commands than that but I don't want to leak my game stuff xD

DarthMDev commented 3 years ago

Ok heres something interesting when i hit play the HD Admin is renamed to hdadminworkspacefolder right? well that's empty

1ForeverHD commented 3 years ago

If you need help writing custom commands feel free to hop on over to #hd-admin in our community: https://hd.community

I'll close this issue for the time being as we're currently using this github for only major core bugs in v2.