- 已编辑
file = getDiceDir().."//plugin//Draw.lua"
file = io.open(file,"a")
file:write([[...]])
plugin\Draw.lua:12: attempt to index a nil value (global ‘file’)
报错是这样的,file:write([[…]])是第12行
一个骰子可以用,还有一个会报错
612的
file = getDiceDir().."//plugin//Draw.lua"
file = io.open(file,"a")
file:write([[...]])
plugin\Draw.lua:12: attempt to index a nil value (global ‘file’)
报错是这样的,file:write([[…]])是第12行
一个骰子可以用,还有一个会报错
612的
脚本名称:Userdate[dice路径]
Dice!版本:612
你可以去我的文件读写的lua文件里找到答案,你也可以在下面的图中找到答案
看到第二幅图,可以发现,可以书写,你可以看看与我第一幅图,那是一个书写lua脚本的代码
我这个用好久了,后来拿给亲友的骰子用发现用不了
乐某人
msg_order = {}
function cs(msg)
if(tonumber(msg.fromQQ) ~= 2083497680 and tonumber(msg.fromQQ) ~= 3388126692)then
return “{nick}没有权限”
end
num = getUserConf(12345678900,“a”,0)
num = num + 1
name = “luaDraw”..num
file = getDiceDir()..“//plugin//luaDraw.lua”
file = io.open(file,“a”)
rest = string.match(msg.fromMsg,“^[%s](.+)[%s]$”,#“.add牌堆”+1)
if(rest == "" or rest == nil)then
return “请{nick}输入牌堆名称”
end
file:write([[
function ]]..name..[[(msg)
return eventMsg(“.draw]]..rest..[[”,msg.fromGroup,msg.fromQQ)
end
msg_order[“]]..rest..[[”] = “]]..name..[[”]])
file:close()
setUserConf(12345678900,“a”,num)
eventMsg(“.system load”, msg.fromGroup, msg.fromQQ)
return “已添加快捷抽取”..rest
end
msg_order[“.add牌堆”] = “cs”
Deep Sea DogBird 具体是什么问题
乐某人
plugin\Draw.lua:12: attempt to index a nil value (global ‘file’)
报错是这样的,file:write([[…]])是第12行
一个骰子可以用,还有一个会报错
Deep Sea DogBird 我是可以使用的,嗯……你可以直接将路径写在io.open的第一个参数那里再试试,或者将//改成/,另外,建议先下载一个Userdate[dice路径],让你朋友试试能不能用,不能就说明是骰子本身的问题,该找色子姐√,能的话,就是脚本的问题
乐某人 好的,谢谢
路径中文