Skip to content

Conditions with blocks return differently when the looped stuff isn't a variable #2175

Closed
@TPGamesNL

Description

@TPGamesNL

Description

The solid condition doesn't work in loops when the given values to loop aren't variables (this is a terrible description but you should look at Steps to Reproduce, it's more understandable).
Same for: is transparent, is flammable

Steps to Reproduce

on rightclick on sand with diamond hoe:
	loop block above and block below:
		message "&21 &r%loop-value% (%""&atrue"" if loop-value is solid, else (""&cfalse"")%&r)"
	set {_b::*} to block above and block below
	loop {_b::*}:
		message "&32 &r%loop-value% (%""&atrue"" if loop-value is solid, else (""&cfalse"")%&r)"

image

Expected Behavior

The condition should return true or false consistently in both loops.

Server Information

  • Server version/platform: Paper-94 (1.14.2)
  • Skript version: 2.4-alpha3

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: 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