Solved Delete too many variables with one delete {Variable::*}

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Barbarx

Active Member
Feb 25, 2017
71
5
0
Hello. i have variables.csv and i have too many variables what i dont using and really too many i think 16K lines.
I want remove them all with one easy metode. i cant remove it manually because every sec can variables change.
code_language.skript:
#I tried delete all variables by:
on command "blabla":
    delete {antipenizecopy::*}
    message "executed" to player

#My variables was set by:
on spawn:
    if "%spawn reason%" is "SPAWNER":
        set {AntiPenizeCopy.%entity%} to true
´
but dont work. :emoji_frowning:
 
That's because your variable is
code_language.skript:
{AntiPenizeCopy.%entity%} instead of {AntiPenizeCopy::%entity%}
 
That's because your variable is
code_language.skript:
{AntiPenizeCopy.%entity%} instead of {AntiPenizeCopy::%entity%}
Yeah but i wanna remove all variables what were set by {AntiPenizeCopy.%entity%}
 
What are list variables can you create it? or explain with example? :emoji_grinning: ty i new in scripting
A list variable looks like this:
code_language.skript:
{list::*}
You can add or remove information by simply using:
code_language.skript:
add player to {list::*}
add "Hello" to {list::*}
remove player from {list::*}
You can also loop through a list:
code_language.skript:
Loop {list::*}:
    Broadcast "%loop-value%"
That will show you everything you have added to the list

In your case you can add the entity to a list:
code_language.skript:
On spawn:
    Add entity to {list::*}
And delete the list If you want to delete all entities saved in the list :emoji_slight_smile:

Hope I could help,
Lukhausen
 
  • Like
Reactions: Barbarx
A list variable looks like this:
code_language.skript:
{list::*}
You can add or remove information by simply using:
code_language.skript:
add player to {list::*}
add "Hello" to {list::*}
remove player from {list::*}
You can also loop through a list:
code_language.skript:
Loop {list::*}:
    Broadcast "%loop-value%"
That will show you everything you have added to the list

In your case you can add the entity to a list:
code_language.skript:
On spawn:
    Add entity to {list::*}
And delete the list If you want to delete all entities saved in the list :emoji_slight_smile:

Hope I could help,
Lukhausen
And how i can do "if"? :emoji_grinning: "If entity is in {list::*}: ?" or how? i dont know how this create :emoji_grinning: and ty for examples
 
Status
Not open for further replies.