War On Console Spam

Expanding and utilizing the engine via C++.
1 post Page 1 of 1
Steve_Yorkshire
Posts: 208
Joined: Tue Feb 03, 2015 10:30 pm
 
  by Steve_Yorkshire » Sun Aug 13, 2017 8:08 pm
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
1 post Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest