folosesc asta in questlib.lua :
out = mysql_query("SELECT * FROM player.mob_proto;")
mob._data = out
mob._idx = {}
table.foreach(out.vnum,
function(i,p)
mob._idx[p]=i
end
)
setmetatable(mob,{
__index = function(this,idx)
local exec = string.gsub(idx,'get_(%.+)','%1')
if this._data[exec] ~= nil then
return function(moid)
return this._data[exec][this._idx[moid or npc.get_race()]]
end
else
return function() return 0 end
end
end
}
)
Dar primesc eroare la aceasta linie :table.foreach(out.vnum,eroarea :
locale/en/quest/questlib.luaAre cineva idee ce ar putea avea ?bad argument #1 to `?' (table expected, got nil)

