搜索
查看: 1935|回复: 8

[求助] 大神们 求助

[复制链接]
发表于 2020-5-8 21:15:28 | 显示全部楼层 |阅读模式
[string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: attempt to call method 'getName' (a nil value)
stack traceback:
        [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: in function <[string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:267>
2020/5/8 21:12:13 {0507} [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: attempt to call method 'getName' (a nil value)
stack traceback:
        [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: in function <[string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:267>
2020/5/8 21:12:21 {0507} [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: attempt to call method 'getName' (a nil value)
stack traceback:
        [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: in function <[string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:267>
2020/5/8 21:12:31 {0507} [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: attempt to call method 'getName' (a nil value)
stack traceback:
        [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: in function <[string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:267>
2020/5/8 21:12:57 {0507} [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: attempt to call method 'getName' (a nil value)
stack traceback:
        [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: in function <[string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:267>
2020/5/8 21:13:10 {0507} [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: attempt to call method 'getName' (a nil value)
stack traceback:
        [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: in function <[string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:267>
2020/5/8 21:13:16 {0507} [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: attempt to call method 'getName' (a nil value)
stack traceback:
        [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: in function <[string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:267>
2020/5/8 21:13:22 {0507} [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: attempt to call method 'getName' (a nil value)
stack traceback:
        [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: in function <[string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:267>
2020/5/8 21:13:24 {0507} [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: attempt to call method 'getName' (a nil value)
stack traceback:
        [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: in function <[string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:267>
2020/5/8 21:13:42 {0507} [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: attempt to call method 'getName' (a nil value)
stack traceback:
        [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: in function <[string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:267>
2020/5/8 21:13:45 {0507} [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: attempt to call method 'getName' (a nil value)
stack traceback:
        [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: in function <[string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:267>
2020/5/8 21:13:49 {0507} [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: attempt to call method 'getName' (a nil value)
stack traceback:
        [string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:270: in function <[string "D:\Mirserver\Mir200\LuaScripts\System\BindE..."]:267>



更新0505 以后  原来的 lua  脚本  报错 我该怎么办?
 楼主| 发表于 2020-5-8 21:19:45 | 显示全部楼层
--死亡物品掉落回调
function on_DieDropItem(actor, itme)
    local item_list = {}
        local item_list1 = {}
    local ItemName = itme:getName()
    local MonsterName = actor:getCharName()
    local ItemMap = itme:getFromMap()
    local MakeName = itme:getFromMaker()
    local MakeTime = itme:getFromTime()
        local MonX = actor:getX()
        local MonY = actor:getY()

       
        for line1 in io.lines("D:\\共享目录\\公告物品列表.txt") do                                --需要公告的装备保存TXT,一行一个装备
        local str1 = line1
        table.insert(item_list1,str1)
    end
       
        for i,k in pairs(item_list1) do
                if k == ItemName then
                        local Msgfile1 = io.open("D:\\共享目录\\全服掉落提醒.txt","w")  --                        local Msg1 = "恭喜:["..s.share.getServerName().."·"..MakeName.."]在["..ItemMap.."("..MonX..","..MonY..")]击杀["..MonsterName.."]爆出:"..ItemName.."\n"
            io.output(Msgfile1)
            io.write(Msg1)
            io.close(Msgfile1)
                        local Msgfile2 = io.open("D:\\共享目录\\全服掉落提醒.txt","a")  --记录时间TXT
                        local Msg2 = os.time().."\n"
            io.output(Msgfile2)
            io.write(Msg2)
            io.close(Msgfile2)
                end
        end
哪个大神 教教如何修改 可以吗?
发表于 2020-5-8 21:59:33 | 显示全部楼层
新版这个函数的参数改变了,你需要修改新版参数。
function on_DieDropItem(actor, killActor, itme)
..
end
 楼主| 发表于 2020-5-8 22:08:41 | 显示全部楼层
获取不到 人物名字  怪物 地图 。。
 楼主| 发表于 2020-5-8 22:10:02 | 显示全部楼层
["..s.share.getServerName().."·"..MakeName.."]在["..ItemMap.."("..MonX..","..MonY..")]击杀["..MonsterName.."]爆出:"..ItemName.."\n"


MakeName.."]在["..ItemMap..  
这两个获取不正确
 楼主| 发表于 2020-5-8 22:10:36 | 显示全部楼层
复活戒指 发表于 2020-5-8 21:59
新版这个函数的参数改变了,你需要修改新版参数。
function on_DieDropItem(actor, killActor, itme)
..

MakeName.."]在["..ItemMap..
哥们 这两个 获取不到 帮帮我吧
发表于 2020-5-8 22:10:56 | 显示全部楼层
原先如果无报错,修改新版后,你 应该只需要在原参数的中间,添加killActor这个参数就可以使用了。
发表于 2020-5-8 22:14:31 | 显示全部楼层
论坛太多大侠了
 楼主| 发表于 2020-5-8 22:22:40 | 显示全部楼层
复活戒指 发表于 2020-5-8 22:10
原先如果无报错,修改新版后,你 应该只需要在原参数的中间,添加killActor这个参数就可以使用了。 ...

killactor 是干嘛的  ?
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|HGEM2论坛

GMT+8, 2024-9-20 06:12 , Processed in 0.478506 second(s), 13 queries .

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表