Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config option case-insensitive variables: false breaks functions #6379

Closed
1 task done
ShaneBeee opened this issue Jan 31, 2024 · 1 comment
Closed
1 task done

Config option case-insensitive variables: false breaks functions #6379

ShaneBeee opened this issue Jan 31, 2024 · 1 comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.

Comments

@ShaneBeee
Copy link
Contributor

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.
@sovdeeth sovdeeth added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: low Issues that are not harmful to the experience but are related to useful changes or additions. labels Jan 31, 2024
@sovdeeth
Copy link
Member

image
Looks like a built-in assumption to Parameter.

@sovdeeth sovdeeth added PR available Issues which have a yet-to-be merged PR resolving it patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. labels Feb 2, 2024
@sovdeeth sovdeeth added completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Feb 17, 2024
@sovdeeth sovdeeth closed this as completed Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.
Projects
None yet
Development

No branches or pull requests

2 participants