我做一個批處理文件來編譯一些DLL,而且幸虧我被困在一個簡單的,但檢測不到錯誤...批量錯誤:「(預計不會在這個時候」
那麼,這是簡單的我想不通爲什麼CMD是給我這個錯誤,有我的代碼:
@echo off
::Call this in case your broke you dll and you cannot start Unity for example
:str
cls
goto :main
:main
echo Hello, well, if you're opening this is because you have done something wrong and you cannot start Unity...
echo.
set /p opt="Do you want to read your path from the 'path.txt' file or do you want to specify? [Y/N] "
echo.
echo Also, this is optional but you can try to establish an order for the compilation.
echo.
echo 1.- Build the API
echo 2.- Build the RAW Scripts
echo 3.- Build the Editor API
echo.
set /p order="Type, for example: [2 1 3], to compile in this order, or the way you want: "
if /i "%opt%" == "Y" (
for /f "delims=" %%f in ("project_path.txt") do (
if "%%f" NEQ "" (
call :callcompile "%%f" "%order%"
)
)
) else (
if /i "%opt%" == "N" (
echo.
set /p cpath="Path: "
goto :callcompile "%cpath%" "%order%"
) else (
goto :str
)
)
goto :EOF
:callcompile
cmd /c compile.bat "%~1" "%~2"
pause
也許,我失去了一些東西,但我看不到任何失敗在我的代碼,也許是因爲我的經驗不足,無論如何,幫助我解決它,因爲我已經附上了所有的條件和一切可能導致麻煩而不幸的事情。所有的來源可以在這裏看到:https://github.com/Lerp2Dev/Lerp2API/blob/master/Compile/emergency_case.bat
此外,有無論如何看到錯誤導致問題的確切線?
是的,您可能很有可能看到錯誤在哪裏。刪除'@echo off',打開一個cmd提示符並從cmd提示執行你的批處理文件,而不是用鼠標雙擊它。 – Squashman
你不能像這樣使用'GOTO':'goto:callcompile「%cpath%」「%order%」'。你沒有把任何東西傳遞給你的子程序。你的cpath變量也必須通過延遲擴展來引用。 – Squashman
這個腳本返回給我做什麼你做什麼建議@Squashman:http://pastebin.com/DkB2RsZv – z3nth10n