There are a couple issues with the code, one of which is critical.
1. The library name of the downloader.sp plugin is not defined. This needs to occur in OnPluginStart() of downloader.sp. The library name doesn't have to match the file name but it DOES have to match the "name" field as defined in the include file.
In downloader.sp:
Code:
public OnPluginStart()
{
RegPluginLibrary("downloader");
...
}
Reference:
http://wiki.alliedmods.net/Optional_...Mod_Scripting)
2. An array looks for "MAX_URL_LEN" for the string length when being created. I put #define MAX_URL_LEN 298 in to make it work.
3. Spelling of the word "success" is consistently mispelt as "sucess". The code compiles and works, but since users of this plug-in have to insert "DownloadFile_Sucess" in their code, I can imagine people missing the spelling error, spelling it correctly in their own code and causing errors.
I have not yet tested this plug-in to see if it works beyond running and hooking with my own plug-in, but I have spent a couple of days trying to figure out why my plug-in wasn't able to hook with Downloader when it was successfully running. I'll report if I find more issues and how I was able to resolve them.