Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong parameter type in custom command #1248

Closed
superx101 opened this issue May 3, 2023 · 0 comments
Closed

Wrong parameter type in custom command #1248

superx101 opened this issue May 3, 2023 · 0 comments
Labels
bug Related to software malfunction priority: high Needs prompt action

Comments

@superx101
Copy link

Exceptions module

ScriptEngine

Operating System

Windows 10

LiteLoader version

2.13.0-beta.1

BDS version

1.19.81.01

What happened?

A syntax error, Syntax error: Unexpected "concrete" at "/test >>concrete<< apple", is displayed when I use my custom command.

Command: test <block: Block> <item: Item>.
Input: /test concrete apple

Block type and Item type seem to have been replaced by "equipment slots".
img1

please refer to “Steps to reproduce” for more details

Steps to reproduce?

There is my JavaScript code to reproduce

const cmd = mc.newCommand("test", "A test command");
cmd.mandatory("block", ParamType.Block);
cmd.mandatory("item", ParamType.Item);
cmd.overload(["block", "item"]);
cmd.setCallback((_cmd, _ori, out, res)=>{});
cmd.setup();

Relevant log output

No response

Plugin list

No response

@ShrBox ShrBox added bug Related to software malfunction module: script engine status: review needed Requires assessment or evaluation priority: high Needs prompt action labels May 3, 2023
@KawaiiNahida KawaiiNahida added status: help wanted bug Related to software malfunction priority: high Needs prompt action and removed bug Related to software malfunction status: review needed Requires assessment or evaluation priority: high Needs prompt action status: help wanted labels May 3, 2023
ShrBox added a commit that referenced this issue May 3, 2023
@ShrBox ShrBox closed this as completed May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Related to software malfunction priority: high Needs prompt action
Development

No branches or pull requests

3 participants