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

Issue when printing a VariableString

Open hapily04 opened this issue 1 year ago • 3 comments

image

on skin init:
    set {_} to skin from username "bill"
    print "%skin from username ""%event-player%""%"
    set event-player's skin to {_}

The 2nd and 4th line work properly, but it appears skript-parser has a problem with the 3rd line, and I'm unsure how to solve it myself at the moment.

hapily04 avatar Feb 21 '24 23:02 hapily04

I would also like to add that the problem likely doesn't lie with the printing part, rather it's likely an internal parsing issue.

hapily04 avatar Feb 21 '24 23:02 hapily04

Can reproduce

TheLimeGlass avatar Mar 27 '24 05:03 TheLimeGlass

Indeed, VariableStrings do not support quotes inside percentage signs like vanilla Skript does. Either way, when implementing this, I would suggest another format instead, because I feel like the current format is bloated.

I originally was thinking something Pythonic: print f"{skin from username "%event-player%"}", but never got to actually implementing it.

Not sure what opinions are on this. I always thought the percentage signs were one of Skript's biggest design mistakes.

Mwexim avatar Mar 27 '24 10:03 Mwexim