Entity.Destroy() crash
#1
For whatever reason, When I use this function cuberite crashes:

[Image: SmvQwhz.png]

Cuberite crashes on launch. I thought this would be a simple task... Any help would be greatly appreciated!  Huh

EDIT:
I fixed it by calling HOOK_SPAWNING_ENTITY instead of HOOK_SPAWNED_ENTITY and doing this:
[Image: SSfWNtW.png]

But there's still no merit for a crash from the former method.
Reply
Thanks given by:
#2
True, Cuberite should not crash. But your code is very flawed. Note that all the Lua API functions use the "object" calling convention in Lua, which means you need to use colons instead of dots: Entity:IsExpOrb(); Entity:Destroy()
Reply
Thanks given by:
#3
Perhaps it crashes because the entity is not added to the world yet while cEntity:Destroy() tries to remove it?
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)