Jump to content

Recommended Posts

Posted

Kept getting annoying console spam. :x


Some object would be deleted whilst in a trigger and the trigger's onLeave callback would call but the object would no longer exist. Note: I never did find out WHAT was actually getting deleted but hey ... it'd be like " Object (1412324) unknown command whatever". To prevent this I threw in an extra check to make sure that the object is properly added before the warnf.

line ~1814 console/compiledEval.cpp

//...
               if(!noCalls && !( routingId == MethodOnComponent ) )
               {
				   if (gEvalState.thisObject->isProperlyAdded())//yorks added for console spam with object deletion in triggers
				   {
					   Con::warnf(ConsoleLogEntry::General, "%s: Unknown command %s.", getFileLine(ip - 6), fnName);
					   if (callType == FuncCallExprNode::MethodCall)
					   {
						   Con::warnf(ConsoleLogEntry::General, "  Object %s(%d) %s compiledEval",
							   gEvalState.thisObject->getName() ? gEvalState.thisObject->getName() : "",
							   gEvalState.thisObject->getId(), Con::getNamespaceList(ns));
					   }
				   }
               }
//...

 

And not had any warnings about unknown objects since. :D

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...