搜索
查看: 357|回复: 3

[求助] getLooks

[复制链接]
发表于 2021-5-30 11:13:30 | 显示全部楼层 |阅读模式
请问如何服务端 获取数据库的getLooks值
local  ItemLooks = item:getLooks() 这样写报错


发表于 2021-5-30 11:36:25 | 显示全部楼层
就简单一段,怎么看啊,哎。。
报错只能说明item有问题
 楼主| 发表于 2021-5-30 13:09:52 | 显示全部楼层
上线发呆 发表于 2021-5-30 11:36
就简单一段,怎么看啊,哎。。
报错只能说明item有问题

getLooks 获取数据库中Looks


--脚本命令RunLuaScript调用LUA脚本
function RunLuaScript8(Actor, item)       
    local Actorname = Actor:getCharName()       
    local RaceId = Actor:getRace()--种族ID
    local  item = Actor:getUseItem(0)
   if item then
       local ItemName = item:getName()--物品名称
       local ItemLooks = item:getLooks() --内观代码
       local ItemMakeIndex = item:getMakeIndex()--制造ID
   print("["..ItemName.."]内观ID:["..tostring(ItemLooks))

   end
end

2021-05-30 13:09:52 {0219} [string "D:\Mirserver360\Mir200\LuaScripts\System\BindEvent.lua"]:710: attempt to call a nil value (method 'getLooks')
stack traceback:
        [string "D:\Mirserver360\Mir200\LuaScripts\System\BindEvent.lua"]:710: in function 'RunLuaScript8'


 楼主| 发表于 2021-5-30 13:10:31 | 显示全部楼层
上线发呆 发表于 2021-5-30 11:36
就简单一段,怎么看啊,哎。。
报错只能说明item有问题

@上线发呆
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|HGEM2论坛

GMT+8, 2024-9-21 12:39 , Processed in 0.493641 second(s), 14 queries .

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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