-2

I'm making a .bat game and I'm putting in save files but I'm not sure how to, what I want it to do basically is run a batch file, "Warrior", then go to a certain part of the code-:Fight_1. I've looked everywhere but can't find anything. I don't need all the code, I know how to start batch files and that and I know the call command I just don't know how to call a certain part of a batch file. Any help appreciated, thanks!

4

1 回答 1

1

好的,很容易(您应该先学习基本批处理),但这是快速解决方案:

调用.bat

Warrior.bat Fight_1

战士.bat

Rem start of Warrior File

if "%1" neq "" ( goto %1)

:: Code Here

:Fight_1

:: Fight code here

Exit

只要您调用文件中存在的标签,这将起作用,否则您将收到错误消息并且程序将失败。

莫娜

于 2013-09-14T06:35:17.327 回答