skript-yaml icon indicating copy to clipboard operation
skript-yaml copied to clipboard

[Suggestion] add value to yaml

Open qsef1256 opened this issue 3 years ago • 3 comments

Currently it is not possible to "add" value to yaml value.

Example:

command /addValue [<number>]:
  trigger:
    load yaml "plugins/Skript/scripts/config.yml"
    add arg 1 to yaml value "test" from "config"

Result: yaml value "test" from "config" can't have anything added to it (BugReport.sk, line 53: add arg 1 to yaml value "test" from "config"')

It can be bypassed by set original value to (the original value + value to add) , but It's quite inconvenient, reduce readability and gets in the way of updating legacy scripts.

I would like to be able to add/remove other values to a yaml value whose value is a number.

qsef1256 avatar Sep 16 '21 11:09 qsef1256

Versions: Server: 3227-Spigot-3c1fc60-a0a37f4 (MC: 1.17.1) Skript Version: 2.6-beta2 Installed Skript Addons: Skellett v1.9.11 (https://forums.skunity.com/resources/skellett.24/) skript-yaml v1.4 skRayFall v1.9.26 (https://sk.rayfall.net/) SkQuery v4.1.5 SkBee v1.11.2 (https://github.com/ShaneBeee/SkBee)

qsef1256 avatar Sep 16 '21 12:09 qsef1256

Technically this is due to the use of lists vs. values, i never took into account adding numbers or strings to a yaml value I'll see what i can do for this issue!

(sorry for the super late reply)

Sashie avatar Apr 07 '22 02:04 Sashie

is there an estimate for how long until this feature comes out? it would fix some issues I'm having with my code and it's a lot so I don't really want to change it

Blackninja04010 avatar May 04 '23 19:05 Blackninja04010