Closed xxr4cc closed 3 months ago
Heyo,
you must escape any backslashes as they are escape characters.
https://en.wikipedia.org/wiki/Escape_character
EDIT:
On closer inspection, the path must also end with .exe
.
Additionally, you somehow ended up using Java 21 which, judging by your logs, is incompatible with your used Minecraft version:
[29May2024 03:38:55.877] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 21.0.1 by Oracle Corporation; OS Windows 11 arch amd64 version 10.0
Though this may be a result of the incomplete Java path. Fix your path then try again.
Cheers, Griefed
I already tried with java.exe javaw.exe java javaw
all of this options didn't work and game me this error
ConvertFrom-StringData : parsing "C:\Program Files\Java\jdk-17\bin\java.exe" - Unrecognized escape sequence \P.
At C:\Users\r4cc\Desktop\create-a-colony-server-v1.0.6\start.ps1:14 char:70
+ ... et-Content -raw -Path $ExternalVariablesFile | ConvertFrom-StringData
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [ConvertFrom-StringData], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
Cannot index into a null array.
At C:\Users\r4cc\Desktop\create-a-colony-server-v1.0.6\start.ps1:17 char:1
+ $MinecraftVersion = $ExternalVariables['MINECRAFT_VERSION']
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
Cannot index into a null array.
At C:\Users\r4cc\Desktop\create-a-colony-server-v1.0.6\start.ps1:18 char:1
+ $ModLoader = $ExternalVariables['MODLOADER']
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
Cannot index into a null array.
At C:\Users\r4cc\Desktop\create-a-colony-server-v1.0.6\start.ps1:19 char:1
+ $ModLoaderVersion = $ExternalVariables['MODLOADER_VERSION']
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
Cannot index into a null array.
At C:\Users\r4cc\Desktop\create-a-colony-server-v1.0.6\start.ps1:20 char:1
+ $LegacyFabricInstallerVersion = $ExternalVariables['LEGACYFABRIC_INST ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
Cannot index into a null array.
At C:\Users\r4cc\Desktop\create-a-colony-server-v1.0.6\start.ps1:21 char:1
+ $FabricInstallerVersion = $ExternalVariables['FABRIC_INSTALLER_VERSIO ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
Cannot index into a null array.
At C:\Users\r4cc\Desktop\create-a-colony-server-v1.0.6\start.ps1:22 char:1
+ $QuiltInstallerVersion =$ExternalVariables['QUILT_INSTALLER_VERSION']
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
Cannot index into a null array.
At C:\Users\r4cc\Desktop\create-a-colony-server-v1.0.6\start.ps1:23 char:1
+ $MinecraftServerUrl = $ExternalVariables['MINECRAFT_SERVER_URL']
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
Cannot index into a null array.
At C:\Users\r4cc\Desktop\create-a-colony-server-v1.0.6\start.ps1:24 char:1
+ $JavaArgs = $ExternalVariables['JAVAARGS']
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
Cannot index into a null array.
At C:\Users\r4cc\Desktop\create-a-colony-server-v1.0.6\start.ps1:25 char:1
+ $Java = $ExternalVariables['JAVA']
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
Cannot index into a null array.
At C:\Users\r4cc\Desktop\create-a-colony-server-v1.0.6\start.ps1:27 char:5
+ if ($Java[0] -eq '"')
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
Cannot index into a null array.
At C:\Users\r4cc\Desktop\create-a-colony-server-v1.0.6\start.ps1:32 char:5
+ if ($Java[$Java.Length-1] -eq '"')
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
Incorrect modloader specified:
Exiting...
Press any key to continue
You still need to escape your \
.
This is not behaviour enforced by ServerPackCreator, by the way. This is nothing I can fix or prevent from my side of things, hence why I closed the issue so quickly. 😊 In case you were wondering.
\
being an escape character is pretty much standard across all operating systems and enforced in many areas.
i don't understand what you mean by that sry can u try to explain it to me so i can fix this problem? i know man and thank you for the help don't want to be annoying i just want to understand
No problem.
That's why I linked the Wikipedia article to a thorough explanation of escape characters.
Since \
is one, it effectively produces the following result:
Your path: C:\Program Files\Java\jdk-17\bin\java.exe
Becomes something like this: C:rogram Filesavadk-17inava.exe
This is because \
escapes the next character.
In order to prevent this, you must escape the escape-character
In your case you need to set the JAVA-variable in the variables.txt from
this: C:\Program Files\Java\jdk-17\bin\java.exe
to: C:\\Program Files\\Java\\jdk-17\\bin\\java.exe
That way, when the scripts do their thing, they will have work with C:\Program Files\Java\jdk-17\bin\java.exe
because you escaped the \
.
AHHHHH OKAYYY thank you so much that helped me a lot :)))) its working now
What happened?
Im using start.psi and i just want to be able to run this server without uninstalling all my java versions
I've tried to change the java path from variables but it doesn't work what can i do to make it work maybe i'm doing it wrong but i just want to play this modpack with my friends
What did you expect to happen?
just expected to be able to change the java path from variables but it doesn't work![image_2024-05-29_041531500](https://github.com/Griefed/ServerPackCreator/assets/94856330/f308c24a-3d44-4416-bb89-6579353181e6)
Version
5.2.3
Relevant log output
Anything else you would like to add?
Tell me!
If you are using the webservice, in which browers did you encounter this bug?
No response
Code of Conduct