[Ajuda] warning "split"
#1

Code de todas as Split da include

PHP код:
stock TempBanCheck(playerid)
{
    new 
ip[15];
    new 
str[128];
    new 
load[4][32];
    new 
ban_dayban_monthban_yearban_ip[15];
    
GetPlayerIp(playeridipsizeof ip);
    new 
yearmonthday;
    
getdate(yearmonthday);
    new 
File:file fopen("Temp/TempBans.ban",io_read);
    if (
file)
    {
        while (
fread(filestrsizeof str))
        {
            
split(strload'|');
            
ban_day strval(load[0]);
            
ban_month strval(load[1]);
            
ban_year strval(load[2]);
            
strmid(ban_ipload[3], 0strlen(load[3])-115);
            if (!(
year >= ban_year && month >= ban_month && day >= ban_day) && !strcmp(ban_ipiptrue))
            {
                
format(strsizeof str"|- You are temporarily banned from this server until: %d/%d/%d -|"ban_dayban_monthban_year);
                
SendClientMessage(playeridREDstr);
                return 
Kick(playerid);
            }
        }
    }
    return 
true;
}
stock LoadCreatedTeles()
{
    if(
fexist(Teles/CreatedTeles.cfg"))
    {
    new File:TPFile = fopen("
Teles/CreatedTeles.cfg", io_read);
    new tpstring[256];
     new Field[6][128];
    new NbTP = 0;
    while(fread(TPFile, tpstring, sizeof(tpstring)))
    {
         if(NbTP >= MAX_CTELES) break;
          if(split(tpstring, Field, ',') == 6)
        {
              strmid(CTeleInfo[NbTP][TName],   Field[0],0,strlen(Field[0]),30);
            CTeleInfo[NbTP][PosX]    = floatstr(Field[1]);
            CTeleInfo[NbTP][PosY]    = floatstr(Field[2]);
            CTeleInfo[NbTP][PosZ]    = floatstr(Field[3]);
            CTeleInfo[NbTP][PosA]    = floatstr(Field[4]);
            CTeleInfo[NbTP][PosInt]    = strlen(Field[5]);
            CTeleInfo[NbTP][TValid]           = 1;
            NbTP++;
            }
        }
    fclose(TPFile);
    print("
\n");
    }
    else printf("
\nERRORFile 'CreatedTeleports' NOT Loaded!\n");
    return 1;
    }
split(const strsrc[], strdest[][], delimiter)
{
    new i, li,aNum,len;
    while(i <= strlen(strsrc))
    {
        if(strsrc[i]==delimiter || i==strlen(strsrc))
        {
            len = strmid(strdest[aNum], strsrc, li, i, 128);
            strdest[aNum][len] = 0;
            li = i+1;
            aNum++;
        }
        i++;
    }
    return aNum;
}
stock SplitIP(ip_string[])
{
    new ip[4],string[16];
    format(string,sizeof(string),ip_string);
    for(new i=0;i<strlen(string);i++)
        if(string[i]=='.')
            string[i]=' ';
    new idx,tmp[32];
    for(new i=0;i<4;i++)
    {
        tmp=L_strtok(string,idx);
        if(tmp[0]=='*')
            ip[i]=-1;
        else
            ip[i]=strval(tmp);
    }
    return ip;

Код:
warning 203: symbol is never used: "split"
Sei que por ser uma warning nгo hб problemas, mas quero deixar o meu GM bem identado, se puderem ajudar...
Reply


Messages In This Thread
warning "split" - by F1N4L - 16.05.2015, 01:44
Re: warning "split" - by Petrick™ - 16.05.2015, 06:31
Re: warning "split" - by PT - 16.05.2015, 22:16

Forum Jump:


Users browsing this thread: 3 Guest(s)