I see this so many times in this plugin:
Code:
// This is just an example:
if(call_some_native())
{
call_another_native(call_some_native())
some_array[call_some_native()] = 10
}
Where you should do:
Code:
new value = call_some_native();
if(value)
{
call_another_native(value)
some_array[value] = 10
}
In other words, cache natives instead of using them more than once because it can slow your plugin down and use more CPU.
Approval pending on changes.
__________________