项目

一般

简介

行为

clearNameList
清除指定文件内容

标签:命令定义|clearNameList

格式
命令名 参数1
clearNameList 文件路径
说明
  • 参数1: 清除文件路径
    路径需要基于..\Mir200\Envir
    举例
    设定清除路径为
    \testlist.txt
    完整清除路径
    ..\Mir200\Envir\testlist.txt


特戒引擎脚本示例:

[@main]
#act
mov s$file \数据文件\测试非预制数据文件.txt
#say
<增加角色名/@添加>\ \
<删除文件中角色名/@删除>\ \
<清理角色名文件/@清理>\ \
<检测角色名是否在文件中/@检测角色名>\ \
<检测角色名位置/@检测角色名位置>\ \
<检测文件存在/@存在>\ \
 
[@添加]
#act
addNameList <$str(s$file)>
readTxt <$str(s$file)> s0
;print命令在控制台输出文件内容
print 文件内容-> s0
 
[@删除]
#if
#act
delNameList <$str(s$file)>
readTxt <$str(s$file)> s0
print 文件内容-> s0
 
[@清理]
#act
clearNameList <$str(s$file)>
readTxt <$str(s$file)> s0
print 文件内容-> s0
 
[@检测角色名]
#if
checkNameList <$str(s$file)>
#act
print 角色名存在
#elseAct
print 角色名不存在
 
#if
#act
readTxt <$str(s$file)> s0
print 文件内容-> s0
 
[@检测角色名位置]
#if
checkNameListPosition <$str(s$file)> < 10 n0
#act
print 角色当前在前10名
print 名次 n0
#elseAct
print 角色当前不在前10名
print 名次 n0
 
[@存在]
#if
fileExist <$str(s$file)>
#act
print 文件存在
#elseAct
print 文件不存在

yangdefeng 更新于 超过 2 年 之前 · 2 修订