Fixed script developer printf

This commit is contained in:
smallmodel 2023-08-16 02:43:22 +02:00
parent 244220f031
commit efed6d0eac
No known key found for this signature in database
GPG key ID: A96F163ED4891440
5 changed files with 9 additions and 9 deletions

View file

@ -341,7 +341,7 @@ void QDECL Com_Printf(const char *msg, ...)
vsprintf(text, msg, argptr); vsprintf(text, msg, argptr);
va_end(argptr); va_end(argptr);
G_Printf("%s", text); gi.DPrintf("%s", text);
} }
/* /*

View file

@ -99,7 +99,7 @@ void AbstractScript::PrintSourcePos( sourceinfo_t *sourcePos, bool dev )
} }
else else
{ {
glbs.Printf( "file '%s', source pos %d line %d column %d:\n", Filename().c_str(), sourcePos->sourcePos, sourcePos->line, sourcePos->column ); glbs.DPrintf( "file '%s', source pos %d line %d column %d:\n", Filename().c_str(), sourcePos->sourcePos, sourcePos->line, sourcePos->column );
} }
} }
@ -115,7 +115,7 @@ void AbstractScript::PrintSourcePos( size_t sourcePos, bool dev )
} }
else else
{ {
glbs.Printf( "file '%s', source pos %d:\n", Filename().c_str(), sourcePos ); glbs.DPrintf( "file '%s', source pos %d:\n", Filename().c_str(), sourcePos );
} }
} }
@ -147,7 +147,7 @@ void AbstractScript::PrintSourcePos( str sourceLine, int column, int line, bool
markerLine.append( "^" ); markerLine.append( "^" );
glbs.Printf( "(%s, %d):\n%s\n%s\n", Filename().c_str(), line, sourceLine.c_str(), markerLine.c_str() ); glbs.DPrintf( "(%s, %d):\n%s\n%s\n", Filename().c_str(), line, sourceLine.c_str(), markerLine.c_str() );
} }
AbstractScript::AbstractScript() AbstractScript::AbstractScript()
@ -736,7 +736,7 @@ void GameScript::Load( const void *sourceBuffer, size_t sourceLength )
if( !nodeLength ) if( !nodeLength )
{ {
glbs.Printf( "^~^~^ Script file compile error: Couldn't parse '%s'\n", Filename().c_str() ); glbs.DPrintf2( "^~^~^ Script file compile error: Couldn't parse '%s'\n", Filename().c_str() );
return Close(); return Close();
} }
@ -745,7 +745,7 @@ void GameScript::Load( const void *sourceBuffer, size_t sourceLength )
if( !m_ProgLength ) if( !m_ProgLength )
{ {
glbs.Printf( "^~^~^ Script file compile error: Couldn't compile '%s'\n", Filename().c_str() ); glbs.DPrintf2( "^~^~^ Script file compile error: Couldn't compile '%s'\n", Filename().c_str() );
return Close(); return Close();
} }

View file

@ -783,7 +783,7 @@ void yyreducepos(uint32_t off)
void yylexerror( const char *msg ) void yylexerror( const char *msg )
{ {
gi.Printf( "%s\n%s", msg, yytext ); gi.DPrintf( "%s\n%s", msg, yytext );
assert( 0 ); assert( 0 );
} }

View file

@ -78,7 +78,7 @@ void yyreducepos(uint32_t off)
void yylexerror( const char *msg ) void yylexerror( const char *msg )
{ {
gi.Printf( "%s\n%s", msg, yytext ); gi.DPrintf( "%s\n%s", msg, yytext );
assert( 0 ); assert( 0 );
} }

View file

@ -1781,7 +1781,7 @@ void ScriptVM::HandleScriptException(ScriptException& exc)
throw e; throw e;
} }
glbs.Printf("^~^~^ Script Error : %s\n\n", exc.string.c_str()); gi.DPrintf2("^~^~^ Script Error : %s\n\n", exc.string.c_str());
if (m_ScriptClass->GetScript()->ScriptCheck()) { if (m_ScriptClass->GetScript()->ScriptCheck()) {
if (g_scriptcheck->integer != 2 || !exc.bIsForAnim) { if (g_scriptcheck->integer != 2 || !exc.bIsForAnim) {