Skip to content

Player commands overloading bugs #392

@KirillBorunov

Description

@KirillBorunov

I created a two variants of same command:
A) /admin skin [targetPlayerId] [skinId]
B) /admin skin [skinId]

All parameters are int.

When the server loads in the console log I see both variants are loaded:

[SampSharp:DEBUG] Registering command /admin skin [skinId]
[SampSharp:DEBUG] Registering command /admin skin [targetPlayerId] [skinId]

In game if I write /admin skin the server prints Usage: /admin skin [skinId]
If I write /admin skin 33 it prints Usage: /admin skin [targetPlayer] [skinId]
If I write /admin skin 1 33 then it works OK with the "A" variant.
It is impossible to use the "B" variant.

The commands are declared as suggested here: https://sampsharp.net/player-commands#grouping-commands
I'm not using permissions nor overriding the default commands behavior.
I tried to swap the order of the command declaration, it swapped the order of the command in the server load log, but it was not changed the behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions