Skip to content

Commit

Permalink
Improve setTrainTrack error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
qaisjp committed Dec 4, 2015
1 parent f7d8522 commit 3491c37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 3 additions & 4 deletions MTA10/mods/shared_logic/lua/CLuaFunctionDefs.Vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2063,11 +2063,10 @@ int CLuaFunctionDefs::SetTrainTrack ( lua_State* luaVM )
return 1;
}
}
m_pScriptDebugging->LogCustom ( luaVM, "track number should be between 0 and 3 inclusive" );
argStream.SetCustomError ( "track number should be between 0 and 3 inclusive" );
}
else
m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage () );


m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage () );
lua_pushboolean ( luaVM, false );
return 1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2784,11 +2784,10 @@ int CLuaVehicleDefs::SetTrainTrack ( lua_State* luaVM )
return 1;
}
}
m_pScriptDebugging->LogCustom ( luaVM, "track number should be between 0 and 3 inclusive" );
argStream.SetCustomError ( "track number should be between 0 and 3 inclusive" );
}
else
m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage () );

m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage () );
lua_pushboolean ( luaVM, false );
return 1;
}
Expand Down

0 comments on commit 3491c37

Please sign in to comment.