I've had the same message pop up when doing stuff on function(destroy), but currently it appears when I go through all weapons in every actor's inventory every frame, spawning visual copies of the weapons with the lifetime of one frame.
The script goes something like this;
Code:
for mo in MovableMan.Actors do
if mo.Health > 0 and IsAHuman(mo) and mo:IsInventoryEmpty() == false then
local actor = ToAHuman(mo);
for i = 1, actor.InventorySize do
local item = actor:Inventory();
if item then
-- spawn <item> --
end
actor:SwapNextInventory(item,true);
end
end
end
The script is completely functional as of now but the error spam in the console is still annoying.
EDIT: The message only occurs when it's a global script. Attaching the script straight to the actor (HumanAI.lua) doesn't seem to produce the error message.