Skip to content

SectionExpression used without a section fails to parse when in another section #7721

@OfficialDonut

Description

@OfficialDonut

Skript/Server Version

[21:04:00 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[21:04:00 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[21:04:00 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[21:04:00 INFO]: [Skript] Server Version: 1.21.4-207-1a7288a (MC: 1.21.4)
[21:04:00 INFO]: [Skript] Skript Version: 2.10.2 (skriptlang-github)
[21:04:00 INFO]: [Skript] Installed Skript Addons:
[21:04:00 INFO]: [Skript]  - SkProtobuf v0.0.1
[21:04:00 INFO]: [Skript]  - SkBee v3.10.0 (https://github.com/ShaneBeee/SkBee)
[21:04:00 INFO]: [Skript]  - SkGrpc v0.0.2
[21:04:00 INFO]: [Skript]  - skript-reflect v2.6 (https://github.com/SkriptLang/skript-reflect)
[21:04:00 INFO]: [Skript] Installed dependencies: None

Bug Description

I have an addon with a SectionExpression (here) which is failing to parse when using the expression without its section, in another section.

command /test:
    trigger:
        if 1 is 1:
            set {_test} to new builder for proto "Example"
[21:08:03 INFO]: [Skript] Reloading test.sk...
[21:08:03 INFO]: Line 4: (test.sk)
[21:08:03 INFO]:     Unexpected entry 'set {_test} to new builder for proto "Example"'. Check whether it's spelled correctly or remove it
[21:08:03 INFO]:     Line: set {_test} to new builder for proto "Example"
[21:08:03 INFO]:
[21:08:03 INFO]:     Encountered 1 error while reloading test.sk! (13ms)

Expected Behavior

Successful parsing.

Steps to Reproduce

See above.

Errors or Screenshots

No response

Other

The following all parse successfully:

command /test:
    trigger:
        # successfully parses
        set {_test} to new builder for proto "Example"

        # successfully parses
        set {_test} to new builder for proto "Example":
            foo: "hello world"

        # successfully parses
        if 1 is 1:
            set {_test} to new builder for proto "Example":
                foo: "hello world"

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.completedThe issue has been fully resolved and the change will be in the next Skript update.priority: mediumIssues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions