Little help with strmid
#2

pawn Код:
function LoadForbidenWords()
{
    INI_Open("FAdmin/Logs/Forbidenwords.txt");
    if(INI_ReadInt("Totalwords") == 0) return 0;
    new totalwords = INI_ReadInt("Totalwords");
    new string[64];
    new key[20];
    for(new i = 0; i < totalwords+1;i++)
    {
        format(string, sizeof(string), "Word_%i", i), INI_ReadString(key,string),strmid(ForbidenWords[i], key, 0, 20, sizeof(ForbidenWords));
        printf("Words loaded: %s",ForbidenWords[i]);
    }
    INI_Close();
    return 1;
}
problem was in loop.. you must start from 0!
problem 2 u format string but you don't do anything with it

EDIT1: You need add 1 more into varriable totalwords like you have 2 words but u must have 3!
Reply


Messages In This Thread
Little help with strmid - by FireCat - 07.09.2011, 11:22
Re: Little help with strmid - by [WSF]ThA_Devil - 07.09.2011, 11:29
Re: Little help with strmid - by Vince - 07.09.2011, 11:56

Forum Jump:


Users browsing this thread: 1 Guest(s)