I'm currently working on map reset code. After a minigame stops (whether a player leaves, someone wins, etc.) this code should run:
Now, the code never even makes it to the 'broadcast "%{worldChosen}%"' line of code. I get the error:
Ilegal char <<> at index 50: [PRIVATE PATH]\<none>
The reason I put [PRIVATE PATH] is because first off, the first part of the path is my personal computer's path. Second off, I did include the end of the path \<none> because that is important as it's trying to get a variable that doesn't exist inside of my server folder.
EDIT: Also, {game.name} is a variable that is set to Spleef-1
Please help, thank you!
code_language.skript:
# Map Reset Code
execute console command "mv delete %{game.name}%"
execute console command "mvconfirm"
create dir "%{game.name}%"
set {_worldData::*} to directory "update\maps"'s files
loop {_worldData::*}:
if loop-value is {game.name}:
set {worldChosen} to {_worldData::1}
broadcast "%{worldChosen}%"
copy dir "%{worldChosen}%" to "/"
execute console command "mv import %{game.name}% normal"
execute console command "mv load %{game.name}%"
set {game.name} to "None"
set {game.started} to "false"
broadcast "{@prefix} Resetting current game... Teleporting all players to &6Lobby-1&r!"
Now, the code never even makes it to the 'broadcast "%{worldChosen}%"' line of code. I get the error:
Ilegal char <<> at index 50: [PRIVATE PATH]\<none>
The reason I put [PRIVATE PATH] is because first off, the first part of the path is my personal computer's path. Second off, I did include the end of the path \<none> because that is important as it's trying to get a variable that doesn't exist inside of my server folder.
EDIT: Also, {game.name} is a variable that is set to Spleef-1
Please help, thank you!