mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Fixed script developer printf
This commit is contained in:
parent
244220f031
commit
efed6d0eac
5 changed files with 9 additions and 9 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue