Skip to content

Function double execution #7718

Open
Open
@ShaneBeee

Description

@ShaneBeee

Skript/Server Version

[12:56:46 INFO]: [Skript] Server Version: 1.21.4-DEV-02dfa94 (MC: 1.21.4)
[12:56:46 INFO]: [Skript] Skript Version: 2.10.2 (skriptlang-github)
[12:56:46 INFO]: [Skript] Installed Skript Addons: None
[12:56:46 INFO]: [Skript] Installed dependencies: None

Bug Description

This was brought to my attention by @OfficialDonut so I'm just relaying the issue.

When broadcasting a stringified function, its called twice.

Test code:

function test(num: number) :: number:
	broadcast "Executing"
	return {_num}

on load:
	broadcast "%test(1)%"

Console output:

[12:54:40 INFO]: Executing
[12:54:40 INFO]: Executing
[12:54:40 INFO]: 1

this does not appear to happen when stringifying and using send it also does not appear to happen when broadcasting without stringify.

Expected Behavior

The function should only be called once.

Steps to Reproduce

See code above

Errors or Screenshots

No response

Other

No response

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: mediumIssues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions