Quote:
|
Originally Posted by Suicid3
if you just use return it would be the same as using return PLUGIN_CONTINUE
|
Not exactly the same.
return; alone suggests that the function has no return value - it only suggests that you want to stop execution of the function. The fact that this acutally returns a zero (which, by chance, is what PLUGIN_CONTINUE is defined to) when used in a public function is an implementation detail.
Basically:
If a function has a return value (for your own (stock) function you can decide yourself, for public functions the host aplication (=AMXX) decides*), you should always use
and also place such a return statement as the last one in the function (otherwise the compiler will moan).
If the function doesn't have a return value, it's not neccessary (and not encouraged) to put a single return at the end; and if you want to exit the function immediately, use
*) technically, all public functions have return a value to the host application. However, the host application can decide to ignore it. In that case the programmer should treat that function as a function without a return value - unless he wants to call it from his own code and return something; that's pretty unlikely though ;o
__________________