View unanswered posts | View active topics It is currently Thu Dec 26, 2024 4:16 am



Reply to topic  [ 4 posts ] 
 Error message 
Author Message
User avatar

Joined: Mon Oct 11, 2010 1:15 pm
Posts: 594
Location: Finlandia
Reply with quote
Post Error message
What exactly causes this message to appear in the lua console?

Code:
ERROR: Tried to add a Particle that already exists in the simulation!


Sat Jan 07, 2017 7:35 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: Error message
If I'm not mistaken I think it's when you create something and then you somehow end up doing the MovableMan:AddParticle(stuff) for a second time of the same object.

I think it was something like that because I recall facing that error once and having fixed it by renaming some variables.


Sun Jan 08, 2017 2:42 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Error message
I've encountered this error when trying to create particles in the destroy() function of objects, I believe specifically in for blocks?

If the pointer mismatch bug is still around (when an MO is destroyed, Lua pointers can get scrambled and change what MO they're referencing), that might be related to this bug. An MO being destroyed, and MOs spawning in the same frame, might be some weird stuff going on.


Sun Jan 08, 2017 8:16 am
Profile
User avatar

Joined: Mon Oct 11, 2010 1:15 pm
Posts: 594
Location: Finlandia
Reply with quote
Post Re: Error message
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

Image

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.


Sun Jan 08, 2017 1:33 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.083s | 13 Queries | GZIP : Off ]