Skript

Skript

743k Downloads

Syntax improvements for local variables

ahmadmsaleem opened this issue ยท 2 comments

commented

Suggestion

Enhancing the syntax for local variables. This enhancement could include introducing shorthand options such as local {var}, loc {var}. alongside the existing {_var} syntax.

Why?

This syntax would offer users more flexibility and options. This change not only makes it easier for newcomers to understand code but also facilitates the creation of Skript tutorials by providing clearer and more concise syntax.

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this suggestion.
commented

Im with Ayham on this. Not a huge fan.

I want to question how often local is required.
Lets say Im in a loop:

on some event:
	set local {var} to 1
	loop something:
		add 1 to local {var}
		if local {var} > 10:
			set local {var} to 1
			do something

This seems very messy to me. and one little miss of local and you break your whole code, which you aint going to get warnings, and the help channels are going to get flooded with "why no work" (after sending 50+ lines of code)

commented

Not really a fan of the idea. The more choices we give to the users about basic functions of Skript the more confusing it becomes.