View Single Post
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: Pluto
Old 12-09-2021 , 14:26   Re: How do i fix these errors and a warning?
Reply With Quote #6

Quote:
Originally Posted by DJEarthQuake View Post
You are misapplying a native as a function header and function header as a native. Radiusdamage cannot be the name of a function and the name of a native. Use another name. Replace radiusdamage with something else, unique.

Code:
RadiusDamage(Float:vecSrc[3], pevInflictor, pevAttacker, Float:flDamage, Float:flRadius, bitsDamageType)
==>
Code:
TheRadiusDamage(Float:vecSrc[3], pevInflictor, pevAttacker, Float:flDamage, Float:flRadius, bitsDamageType)
API is www.amxmodx.org/api/

One can type radiusdmage and it is a native in the api. You are using a native as a name of a function. Can not do that.

I erased the part about the consequences of the native radiusdamage as that is not what you were really trying to use. It hoses the client. It can be fixed but it's more code and not worth the effort as it will always be buggy.
When I replaced the old line with the new line you gave me, I got 2 errors, but I fixed them by myself. Now, the plugin works. Adding "The" (or anything else that makes "RadiusDamage" unique) fixed the problem, and eliminated the rest of the errors (and the warning) I mentioned in my first post.

Thanks.
GlobalPlague is offline