Turbe$Z Posted March 19, 2017 Author Share Posted March 19, 2017 (edited) 18 minutes ago, NeXuS™ said: Replace your checkValues function Hide contents function checkValues( source,arg1,arg2) if (arg2 >= 60) then t[ source ][ 'min' ] = tonumber( t[ source ][ 'min' ] or 0 ) + 1 t[ source ][ 'sec' ] = 0 end if (arg1 >= 60) then t[ source ][ 'min' ] = 0 t[ source ][ 'hours' ] = tonumber( t[ source ][ 'hours' ] or 0 ) + 1 end return arg1, arg2end with Hide contents function checkValues( source,arg1,arg2) if (arg2 >= 60) then t[ source ][ 'min' ] = tonumber( t[ source ][ 'min' ] or 0 ) + 1 t[ source ][ 'sec' ] = 0 end if (arg1 >= 60) then t[ source ][ 'min' ] = 0 t[ source ][ 'hours' ] = tonumber( t[ source ][ 'hours' ] or 0 ) + 1 dependent(source) end return arg1, arg2end same problem Edited March 19, 2017 by Turbo777 Link to comment
Turbe$Z Posted March 19, 2017 Author Share Posted March 19, 2017 1 minute ago, NeXuS™ said: And what's the problem? does not put into the acl Link to comment
NeXuS™ Posted March 19, 2017 Share Posted March 19, 2017 function checkValues( source,arg1,arg2) if (arg2 >= 60) then t[ source ][ 'min' ] = tonumber( t[ source ][ 'min' ] or 0 ) + 1 t[ source ][ 'sec' ] = 0 end if (arg1 >= 60) then t[ source ][ 'min' ] = 0 t[ source ][ 'hours' ] = tonumber( t[ source ][ 'hours' ] or 0 ) + 1 end dependent(source) return arg1, arg2 end Moving the dependent function out of the if statement will do a better result. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now