Skip to content

Commit 0c6c6cb

Browse files
qaisjpccw808
authored andcommitted
Make sure getCameraFOV prints an error
1 parent da94baf commit 0c6c6cb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

MTA10/mods/shared_logic/lua/CLuaFunctionDefs.Camera.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ int CLuaFunctionDefs::SetCameraFieldOfView ( lua_State* luaVM )
177177
{
178178
while (true) {
179179
if ( fFOV < 0 || fFOV > 179 ) {
180-
argStream.SetCustomError ( "FOV is outside the 0-179 boundary" );
180+
argStream.SetCustomError ( "Invalid FOV range (0-179)" );
181181
break;
182182
}
183183

@@ -231,6 +231,7 @@ int CLuaFunctionDefs::GetCameraFieldOfView ( lua_State* luaVM )
231231
return 1;
232232
}
233233

234+
m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage () );
234235
lua_pushboolean ( luaVM, false );
235236
return 1;
236237
}

0 commit comments

Comments
 (0)