View Single Post
naris
AlliedModders Donor
Join Date: Dec 2006
Old 01-27-2011 , 16:48   Re: SMLIB 0.9 BETA (266 Function Stocks)
Reply With Quote #16

This function must not be correct

I would think that "connectspectate.phrases" should be replaced with path and "translations/connectspectate.phrases.txt" with szTranslationsPath.

PHP Code:
stock File_LoadTranslations(const String:path[])
{
    new 
String:szTranslationsPath[PLATFORM_MAX_PATH];

    
Format(szTranslationsPath,sizeof(szTranslationsPath),"translations/%s",path);
    
BuildPath(Path_SMszTranslationsPathsizeof(szTranslationsPath), "translations/connectspectate.phrases.txt");
    
    if (
FileExists(szTranslationsPath)){
        
LoadTranslations("connectspectate.phrases");
    } 
    else {
        
SetFailState("[%s] Unable to locate translation file (%s).",g_sPlugin_Name,szTranslationsPath);
    } 
naris is offline