Como arruma esses 2 erros ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: Como arruma esses 2 erros ? (
/showthread.php?tid=279315)
Como arruma esses 2 erros ? -
CanTLoGin - 26.08.2011
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);
Re: Como arruma esses 2 erros ? -
StrondA_ - 26.08.2011
cara existe dois new tmp[256], tmp2[256]...
Re: Como arruma esses 2 erros ? -
CanTLoGin - 26.08.2011
nгao deu Stronda ;\
msn:
yan_matheus26@hotmail.com
Re: Como arruma esses 2 erros ? -
[R] ousenber [K] - 26.08.2011
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;
}
Re: Como arruma esses 2 erros ? -
CanTLoGin - 26.08.2011
coloca esse codigo em qual das linhas ?
sгo 2 linha com erro
Re: Como arruma esses 2 erros ? -
StrondA_ - 26.08.2011
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
Re: Como arruma esses 2 erros ? -
CanTLoGin - 26.08.2011
vlw mesmo. consegui !