Non-posted plugin list [+5 plugins]
#21
(04-23-2015, 08:53 AM)xoft Wrote: What kind of mob? I guess there's a mismatch between the mob's class and the Lua API class used. We don't export explicit mob classes, such as "cCreeper", but perhaps the code is trying to push such a class to Lua, which I know causes crashes.

I don't do any cast here. Here is a test plugin. If it's running right-click an entity and the server will crash.
function Initialize(Plugin)
    Plugin:SetName("TestPlugin")
    Plugin:SetVersion(1)
    
    -- Hook
    cPluginManager:AddHook(cPluginManager.HOOK_PLAYER_RIGHT_CLICKING_ENTITY, OnPlayerRightClickingEntity);
    
    LOG("Initialised " .. Plugin:GetName() .. " v." .. Plugin:GetVersion())
    return true
end

function OnPlayerRightClickingEntity(Player, Entity)
    local world = cRoot:Get():GetDefaultWorld()
    world:DoWithEntityByID(
        Entity:GetUniqueID(),
        function(Entity)
            
        end
    )
end
Reply
Thanks given by:


Messages In This Thread
Non-posted plugin list [+5 plugins] - by tonibm19 - 10-13-2014, 05:19 AM
RE: Non-posted plugin list [+5 plugins] - by xoft - 12-02-2014, 07:46 AM
RE: Non-posted plugin list [+5 plugins] - by xoft - 04-23-2015, 08:53 AM
RE: Non-posted plugin list [+5 plugins] - by Seadragon91 - 04-23-2015, 02:40 PM
RE: Non-posted plugin list [+5 plugins] - by xoft - 04-24-2015, 06:23 AM



Users browsing this thread: 1 Guest(s)