Olyno / skent

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

Execute Batch File Not Working #36

Closed Zax809 closed 5 months ago

Zax809 commented 2 years ago

Describe your problem

My code is supposted to execute a batch file: start.bat Because that should run the minecraft server. But it just gives me an error in the console.

Versions

Skript: 2.6.2 (/ver skript) Server: Paper 1.12.2 (/ver) Skent: 3.1.0 (/ver skent)

Code

command /start [<text>]:
    trigger:
        if arg-1 is set:
            set {_dir} to ""
            run file path "%{_dir}%/%arg-1%/start.bat"
            send "{@p} Hvis serveren eksistere starter &a%arg-1% &7nu.."
        else:
            send "{@p} Skriv en server du vil starte."

Error

https://pastebin.com/3C2C8fD7

Olyno commented 2 years ago

Hi, thank you for creating this issue. Your arg-1 seems empty (or your {_dir} variable), causing this error. Please try with values.

If this problem persists, it is because of the current async system, which is really bad unfortunately.

Zax809 commented 2 years ago

I did set {_dir} in my original skript but decided to not show it, not sure why now probably a bit silly.

And about the async system, is there a way you could improve it or is it not possible currently?

Thanks for your time.

Olyno commented 2 years ago

For the moment, I don't have time to work on my projects related to Skript, but it is planned in the future. It will be necessary to wait until the beginning of 2023 to see some changes.

Olyno commented 5 months ago

This issue is old, and should be fixed by now. Please reopen this issue if you still experience this issue.