File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
MTA10/mods/shared_logic/lua Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -200,22 +200,20 @@ int CLuaFunctionDefs::OutputClientDebugString ( lua_State* luaVM )
200200int 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}
You can’t perform that action at this time.
0 commit comments