Skip to content

Command overloading stopped working properly #344

@Sasino97

Description

@Sasino97

Command overloading used to work fine, but after updating to the latest SampSharp version, only the first version of a command is being recognized.

The following code:

[Command("rob", "rb")]
private void RobCommand(Player victim) // Player is a subclass of BasePlayer
{
    // omitted
}

[Command("rob", "rb")]
private void RobCommand()
{
    // omitted
}

Outputs:

Usage: /rob [victim]

If the players types /rob without specifying the victim parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-CommandsIssues related to player/RCON commandsarea-GMIssues related to SampSharp.GameModebug

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions