Olyno / skent

Manage your files and folder with Skript
GNU General Public License v3.0
11 stars 2 forks source link

Deleting a path variable #34

Open MinecraftMan1013number2 opened 2 years ago

MinecraftMan1013number2 commented 2 years ago

Describe your problem

You cannot delete a variable that is set to a path. Instead of deleting the path, it just deletes the variable. I suggest changing the syntax of delete %path% to delete [path] %path% or something similar.

Versions

Skript: 2.6.2 Server: 1.17.1 Skent: 3.1.0

Code

set {_path} to directory path "plugins/Skript/scripts/DisabledScripts/"
delete {_path}

Error

None

Olyno commented 2 years ago

Hi 👋🏻 Thanks you for the report, i will look at this issue later. Also, i can't change the effect from delete %path% to delete [path] %path%, it wouldn't make sense: delete path directory path "plugins/Skript/scripts/DisabledScripts/". I could make it optional as you suggested, so people would use it only for variables, but the fact they could use it without any variable is kinda problematic to me.