2.9 Adding strings with null value empties string
AhplBusinessman opened this issue ยท 3 comments
Skript/Server Version
[09:10:52 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[09:10:52 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[09:10:52 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[09:10:52 INFO]: [Skript] Server Version: 1.20.6-148-20f5165 (MC: 1.20.6)
[09:10:52 INFO]: [Skript] Skript Version: 2.9.0 (skriptlang-github)
[09:10:52 INFO]: [Skript] Installed Skript Addons:
[09:10:52 INFO]: [Skript] - skript-reflect v2.4 (https://github.com/SkriptLang/skript-reflect)
[09:10:52 INFO]: [Skript] - SkBee v3.5.7 (https://github.com/ShaneBeee/SkBee)
[09:10:52 INFO]: [Skript] Installed dependencies: None
Bug Description
Using the new string adding feature the results in nothing if you add a string with an unset value like an empty variable
Expected Behavior
I can't tell if this is intentional behaviour but it feels strange because every other way to combine strings including the concat function added in this same update properly handles combining with an empty value.
It is currently the most minimal way to combine strings and would be unfortunate if I needed to use something else to solve the edge case
Steps to Reproduce
send "1" + {_null} # returns nothing
Errors or Screenshots
No response
Other
No response
Agreement
- I have read the guidelines above and affirm I am following them with this report.
This is intentional for arithmetic to fail if any of it's operations fail. We could possibly add the empty string as a default value for strings but that would need some good testing to make sure it doesn't break anything.
Basically, this is working as intended but we could make an enhancement to improve it.