修正 login 脚本指令返回值不正确的问题 (感谢 "差记性的小北" 反馈) #757
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
问题描述
使用 login 指令成功拉起一个角色之后,脚本指令的返回值是 0
预期结果
成功拉起角色的话,返回值应该是 1 才对
问题分析
脚本函数处理代码中,提前使用 pushint 压入一个默认值,并在后续流程中根据需要 pushint 其他值这种做法并不能被支持。换而言之,在所有可能得代码分支中,只能出现一次 pushint,即便出现多次程序也只认第一次