Skript

Skript

743k Downloads

Config option `case-insensitive variables: false` breaks functions

ShaneBeee opened this issue ยท 1 comments

commented

Skript/Server Version

[00:43:48 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[00:43:48 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[00:43:48 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[00:43:48 INFO]: [Skript] Server Version: git-Paper-405 (MC: 1.20.4)
[00:43:48 INFO]: [Skript] Skript Version: 2.8.0 (skriptlang-github)
[00:43:48 INFO]: [Skript] Installed Skript Addons: 
[00:43:48 INFO]: [Skript]  - skript-reflect v2.4 (https://github.com/SkriptLang/skript-reflect)
[00:43:48 INFO]: [Skript]  - SkBee v3.2.1 (https://github.com/ShaneBeee/SkBee)
[00:43:48 INFO]: [Skript] Installed dependencies: 
[00:43:48 INFO]: [Skript]  - Vault v1.7.3-b131

Bug Description

I recently changed a config option, then a few days later noticed a command of mine wasn't working.
After 10+ minutes of digging around, I noticed the Skript config option:
case-insensitive variables: false
when set to false (which is true by default) screws up function use when using caps in function param names.

Im assuming Skript treats the params as all lower case, since using them the same as typed with caps, does not work.
See below.

Expected Behavior

The function should work as is.

Steps to Reproduce

set this option in config to false:
case-insensitive variables: false

reproduction code:

function test(TEST: string):
	broadcast "String TEST: %{_TEST}%"
	broadcast "String test: %{_test}%"

on load:
	test("test")

output:

[00:45:37 INFO]: String TEST: <none>
[00:45:37 INFO]: String test: test

This is doing the exact opposite as it should be doing.

When setting the config option back to true... outcome:

[00:46:17 INFO]: String TEST: test
[00:46:17 INFO]: String test: test

Errors or Screenshots

No response

Other

No response

Agreement

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

image
Looks like a built-in assumption to Parameter.