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

Issue when printing a VariableString #158

Open
hapily04 opened this issue Feb 21, 2024 · 3 comments
Open

Issue when printing a VariableString #158

hapily04 opened this issue Feb 21, 2024 · 3 comments

Comments

@hapily04
Copy link

hapily04 commented Feb 21, 2024

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
Copy link
Author

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.

@TheLimeGlass
Copy link
Contributor

Can reproduce

@Mwexim
Copy link
Owner

Mwexim commented Mar 27, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants