Como arruma esses 2 erros ?
#1

pawn Код:
C:\Users\YaanMatheus\Desktop\Gang FS\filterscripts\gang.pwn(361) : error 017: undefined symbol "strtok"
C:\Users\YaanMatheus\Desktop\Gang FS\filterscripts\gang.pwn(361) : error 033: array must be indexed (variable "tmp2")
C:\Users\YaanMatheus\Desktop\Gang FS\filterscripts\gang.pwn(361) : warning 203: symbol is never used: "Index"
C:\Users\YaanMatheus\Desktop\Gang FS\filterscripts\gang.pwn(671) : error 017: undefined symbol "strtok"
C:\Users\YaanMatheus\Desktop\Gang FS\filterscripts\gang.pwn(671) : error 033: array must be indexed (variable "tmp")
C:\Users\YaanMatheus\Desktop\Gang FS\filterscripts\gang.pwn(671) : warning 203: symbol is never used: "Index"
Linha 361:
pawn Код:
new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
Linha 671:
pawn Код:
new tmp[256] , Index; tmp = strtok(params,Index);
Reply
#2

cara existe dois new tmp[256], tmp2[256]...
Reply
#3

nгao deu Stronda ;\
msn: yan_matheus26@hotmail.com
Reply
#4

Tenta.
PHP код:
strtok(const string[], &index)
{
    new 
length strlen(string);
    while ((
index length) && (string[index] <= ' '))
    {
        
index++;
    }
 
    new 
offset index;
    new 
result[20];
    while ((
index length) && (string[index] > ' ') && ((index offset) < (sizeof(result) - 1)))
    {
        
result[index offset] = string[index];
        
index++;
    }
    
result[index offset] = EOS;
    return 
result;

Reply
#5

coloca esse codigo em qual das linhas ?
sгo 2 linha com erro
Reply
#6

No final do script, ta ai a soluзгo, como eu nгo percebi ¬¬ !
meu erro:
pawn Код:
strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}
correto:
pawn Код:
strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }
 
    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}
Agora ta resolvido... rs
Reply
#7

vlw mesmo. consegui !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)