Reputation: 874
I have the following code in my batch file:
if "%startserver%"=="y"(
java -Xmx1024M -jar craftbukkit.jar -o true
exit
)
if "%startserver%"=="n"(
exit
) else (
goto invalid
)
It gives the following error when I run it:
The syntax of the command is incorrect.
Upvotes: 1
Views: 126
Reputation: 917
There needs to be a space between the quotes
"
and the open parenthesis (
, like so:
if "%startserver%"=="y" (
java -Xmx1024M -jar craftbukkit.jar -o true
exit
)
if "%startserver%"=="n" (
exit
) else (
goto invalid
)
Upvotes: 2