So, I've been using this code with skUtilities to create a sort of /scripts command
The two errors I have is that
1. It shows the whole file path like C:\Windows\Desktop\etc
2. It shows a .sk at the end
For the first issue, I've had 2 ideas to fix it and tried one of those ideas
The first idea was to split it by "\", then take the last one in the list of "\" and use it. That would theoritically give me a Skript Name.sk, but it didnt work
The second idea was to remove all the letters until the last \. but I didn't know how to do that
I have no idea how to solve the second issue.
I want it to be like
Scripts (4): This, That, Those, These
Well not those names but like you get the point. I'll give information if needed, and will install an addon if needed. Thanks!
code_language.skript:
command /scripts:
trigger:
clear {iBasics.scripts::*}
loop directory "plugins\Skript\scripts"'s files:
add loop-value to {iBasics.scripts::*}
set {_count} to 0
loop {iBasics.scripts::*}:
increase {_count} by 1
message "Scripts (%{_count}%): &a%{iBasics.scripts::*}%"
1. It shows the whole file path like C:\Windows\Desktop\etc
2. It shows a .sk at the end
For the first issue, I've had 2 ideas to fix it and tried one of those ideas
The first idea was to split it by "\", then take the last one in the list of "\" and use it. That would theoritically give me a Skript Name.sk, but it didnt work
The second idea was to remove all the letters until the last \. but I didn't know how to do that
I have no idea how to solve the second issue.
I want it to be like
Scripts (4): This, That, Those, These
Well not those names but like you get the point. I'll give information if needed, and will install an addon if needed. Thanks!