Skip to content

Functions not working when passing empty list variable #3687

@bloggy

Description

@bloggy

Description

Functions not working correctly when passing an empty list variable to them.

Steps to Reproduce

The script:

function testfunc(l: objects):
	broadcast "something"

command /testing [<text>] [<text>]:
	trigger:
		testfunc({_temp::*})

Result should be:
"something" in the chat.
But nothing happens. (not even a console error)

Now if you add an element to the list variable like this, it will work:

function testfunc(l: objects):
	broadcast "something"

command /testing [<text>] [<text>]:
	trigger:
		add "red" to {_temp::*}
		testfunc({_temp::*})

result: "something" in chat

Expected Behavior

The code in the functions should be executed, even when you pass an empty list variable to it.

Server Information

  • Server version/platform: Tuinity 1.16.4
  • Skript version: 2.5.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn 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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions