[Ajuda] Erro - 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: [Ajuda] Erro (
/showthread.php?tid=281284)
[Ajuda] Erro -
CanTLoGin - 05.09.2011
pawn Код:
G:\Documents and Settings\ALESSANDRO\Desktop\dealership.pwn(1180) : error 021: symbol already defined: "strtok"
G:\Documents and Settings\ALESSANDRO\Desktop\dealership.pwn(1195) : error 047: array sizes do not match, or destination array is too small
G:\Documents and Settings\ALESSANDRO\Desktop\dealership.pwn(1201) : error 047: array sizes do not match, or destination array is too small
G:\Documents and Settings\ALESSANDRO\Desktop\dealership.pwn(1234) : error 047: array sizes do not match, or destination array is too small
G:\Documents and Settings\ALESSANDRO\Desktop\dealership.pwn(1383) : error 047: array sizes do not match, or destination array is too small
Re: [Ajuda] Erro -
Pharrel - 05.09.2011
Tem 2 new strtok; na mesma funзгo...
o numero de letras na string й maior q o tamanho da string, por exemplo:
new string[12]; e na string tem + de 12 caracteres.
Re: [Ajuda] Erro -
CanTLoGin - 05.09.2011
vlw
Re: [Ajuda] Erro -
Pharrel - 05.09.2011
De nadega
Re: [Ajuda] Erro -
CanTLoGin - 05.09.2011
Tentei fazer. nгo deu. Strtok:
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;
}
na linha 1195 tem isso
e nas outras linhas
pawn Код:
cmd = strtok(cmdtext, idx);
Help :S
Re: [Ajuda] Erro -
Hardware - 05.09.2011
Qual erro?
Re: [Ajuda] Erro -
CanTLoGin - 05.09.2011
pawn Код:
G:\Documents and Settings\ALESSANDRO\Desktop\dealership.pwn(1180) : error 021: symbol already defined: "strtok"
G:\Documents and Settings\ALESSANDRO\Desktop\dealership.pwn(1195) : error 047: array sizes do not match, or destination array is too small
G:\Documents and Settings\ALESSANDRO\Desktop\dealership.pwn(1201) : error 047: array sizes do not match, or destination array is too small
G:\Documents and Settings\ALESSANDRO\Desktop\dealership.pwn(1234) : error 047: array sizes do not match, or destination array is too small
G:\Documents and Settings\ALESSANDRO\Desktop\dealership.pwn(1383) : error 047: array sizes do not match, or destination array is too small
Re: [Ajuda] Erro -
Hardware - 05.09.2011
Quando eu usava strtok, eu colocava uma include assim:
#include "../include/gl_common.inc"
E nгo colocava esse esquema de strtok no final e funcionava perfeitamente.
Re: [Ajuda] Erro -
Pharrel - 05.09.2011
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;
}
meu strtok й assim, nem comparei com o seu
Re: [Ajuda] Erro -
CanTLoGin - 05.09.2011
nгo deu nenhum dos 2. =\