MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / Warning

Method Warning

neo/game/script/Script_Interpreter.cpp:493–507  ·  view source on GitHub ↗

============ idInterpreter::Warning Prints file and line number information with warning. ============ */

Source from the content-addressed store, hash-verified

491============
492*/
493void idInterpreter::Warning( const char *fmt, ... ) const {
494 va_list argptr;
495 char text[ 1024 ];
496
497 va_start( argptr, fmt );
498 vsprintf( text, fmt, argptr );
499 va_end( argptr );
500
501 if ( ( instructionPointer >= 0 ) && ( instructionPointer < gameLocal.program.NumStatements() ) ) {
502 statement_t &line = gameLocal.program.GetStatement( instructionPointer );
503 common->Warning( "%s(%d): Thread '%s': %s", gameLocal.program.GetFilename( line.file ), line.linenumber, thread->GetThreadName(), text );
504 } else {
505 common->Warning( "Thread '%s' : %s", thread->GetThreadName(), text );
506 }
507}
508
509/*
510================

Callers

nothing calls this directly

Calls 4

vsprintfFunction · 0.85
NumStatementsMethod · 0.45
GetFilenameMethod · 0.45
GetThreadNameMethod · 0.45

Tested by

no test coverage detected