Is it fine to
ThrowNativeError in a function which is called by a native?
Like
here
I want to create a client validation stock which will throw native errors so i can get rid of such lines in all of my natives
Code:
if ( !IsClientIndex( iClient ) )
return ThrowNativeError( SP_ERROR_NATIVE, "Invalid client index %i", iClient );
if ( !IsClientInGame( iClient ) )
return ThrowNativeError( SP_ERROR_NATIVE, "Client %i is not in game", iClient );
Also, is it necessary to
return after throwing an error?
Code:
return ThrowNativeError();
(I assume that
ThrowNativeError just returns
0)
I saw some natives do it, some not.
Just a little confused
__________________