Skip to content

Commit

Permalink
add Warning msg on bad json load
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikk155 committed Apr 23, 2024
1 parent 401ee67 commit c4fa522
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/mikk/json.as
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,10 @@ class json
File@ pFile = g_FileSystem.OpenFile( ( m_szLoad.StartsWith( 'scripts/' ) ? '' : 'scripts/' ) + m_szLoad, OpenFile::READ );

if( pFile is null || !pFile.IsOpen() )
{
g_EngineFuncs.ServerPrint( "WARNING! Can not open " + m_szLoad + " things won't work as expected!\n" );
return 2;
}

while( !pFile.EOFReached() )
{
Expand Down

0 comments on commit c4fa522

Please sign in to comment.