Quote:
Originally Posted by cravenge
Those errors are harmless, but I assure you that the plugin will still work. I'm kinda working it out on figuring what causes them to pop out and why.
|
You're not checking whether it is a valid entity:
Code:
public void OnEntityCreated(int entity, const char[] classname)
{
if (entity < 1 || entity > 2048)
{
return;
[...]
vs
Code:
public void OnEntityDestroyed(int entity)
{
if (IsAmmoPack(entity) && !IsAmmoPackOwned(entity))
{
[...]
Adding some check in OnEntityDestroyed before blindly using "entity" might fix it.
__________________