Skip to content

Function signature changed errors too many times #4638

Open
@TPGamesNL

Description

@TPGamesNL

Skript/Server Version

[16:07:45 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[16:07:45 INFO]: [Skript] Skript's documentation can be found here: https://skriptlang.github.io/Skript
[16:07:45 INFO]: [Skript] Server Version: git-Paper-177 (MC: 1.18.1)
[16:07:45 INFO]: [Skript] Skript Version: 2.6.1
[16:07:45 INFO]: [Skript] Installed Skript Addons:
[16:07:45 INFO]: [Skript]  - skript-reflect v2.2.4-dev (https://github.com/TPGamesNL/skript-reflect)
[16:07:45 INFO]: [Skript] Installed dependencies: None

Bug Description

Function signature errors after the initial load can multiply

Expected Behavior

Just a single error to occur

Steps to Reproduce

Script 1:
define a function

function abc():
	broadcast "abc() called"

Script 2:
any code calling the function

command /test2:
	trigger:
		abc()

Load both scripts
Reload script 2 multiple times
Modify script 1 so that the function call from script 2 becomes invalid (for example, rename the function)
Reload script 1

Errors or Screenshots

image

Other

One error is added each time script 2 is loaded. This happens because Signature#calls is only added to, but its values are never removed, not even when unloading

Agreement

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn issue that needs to be fixed. Alternatively, a PR fixing an issue.functionsRelated to functionspriority: lowIssues that are not harmful to the experience but are related to useful changes or additions.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions