Skip to content

Commit 2af3da0

Browse files
committed
Partially revert f7d8522
1 parent 83cbf3c commit 2af3da0

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -200,22 +200,20 @@ int CLuaFunctionDefs::OutputClientDebugString ( lua_State* luaVM )
200200
int CLuaFunctionDefs::SetWindowFlashing ( lua_State* luaVM )
201201
{
202202
// bool setWindowFlashing ( bool flash [, int count = 10 ] )
203-
bool flash; int count;
203+
bool flash; uint count;
204204

205205
CScriptArgReader argStream ( luaVM );
206206
argStream.ReadBool ( flash );
207207
argStream.ReadNumber ( count, 10 );
208208

209209
if ( !argStream.HasErrors () )
210210
{
211-
if (count > 0) {
212-
lua_pushboolean ( luaVM, CStaticFunctionDefinitions::SetWindowFlashing ( flash, count ) );
213-
return 1;
214-
} else
215-
argStream.SetCustomError ( "'count' should be greater than 0" );
211+
lua_pushboolean ( luaVM, CStaticFunctionDefinitions::SetWindowFlashing ( flash, count ) );
212+
return 1;
216213
}
214+
else
215+
m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage () );
217216

218-
m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage () );
219217
lua_pushboolean ( luaVM, false );
220218
return 1;
221219
}

0 commit comments

Comments
 (0)