Skip to content

Improve error messages for invalid function parameters #8040

@sovdeeth

Description

@sovdeeth

Skript/Server Version

2.12

Bug Description

The error message for a function with bad parameters results in a very poor explanation:

Image

Expected Behavior

The function(types) doesn't exist error message should be printed instead.

Steps to Reproduce


using local variable type hints
command /test:
    permission: op
    trigger:
        set {_number} to true
        type_hint_argument_test({_number})

local function type_hint_argument_test(number: number):
    stop

Errors or Screenshots

No response

Other

This is due to the re-parsing of the arguments specifically as an expressionlist in SkriptParser#parseFunction, lines 1129-1141.

Agreement

  • I have read the guidelines above and affirm I am following them with this report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    PR availableIssues which have a yet-to-be merged PR resolving itbugAn issue that needs to be fixed. Alternatively, a PR fixing an issue.priority: lowIssues that are not harmful to the experience but are related to useful changes or additions.

    Type

    Projects

    Status

    Planned Issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions