[Pedido] include strtok? - 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: [Pedido] include strtok? (
/showthread.php?tid=611612)
include strtok? -
C0D3Xexe - 08.07.2016
Alguйm poderia disponibilizar um link??
oq achei no ****** estгo dando crash
2bju na bunda
Re: include strtok? -
XandyMello - 08.07.2016
pawn Код:
stock 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: include strtok? -
C0D3Xexe - 08.07.2016
Quote:
Originally Posted by XandyMello
pawn Код:
stock 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; }
|
sу adicionara ela no fim da GM?
Re: include strtok? -
Diogo123 - 08.07.2016
Quote:
Originally Posted by C0D3Xexe
sу adicionara ela no fim da GM?
|
sim, nada mais nada menos
Re: include strtok? -
C0D3Xexe - 08.07.2016
Quote:
: fatal error 100: cannot read from file: "strtok"
|
adicionei ao final da GM o mesmo apresenta este erro :/
estranho --'
Re: include strtok? -
ipsLuan - 09.07.2016
Adiciona no inicio, apуs main().
Re: include strtok? -
Dayvison_ - 09.07.2016
Cara este erro й porque vocк estб incluindo algo com o nome strtok, sendo que й apenas uma funзгo...
Re: include strtok? -
ipsLuan - 09.07.2016
Ou entгo, tenta tirar o stock da frente, jб vi casos similar.
Respuesta: Re: include strtok? -
Kanuy - 09.07.2016
Quote:
Originally Posted by C0D3Xexe
adicionei ao final da GM o mesmo apresenta este erro :/
estranho --'
|
Vocк usou dessa forma?
Se for amigo... DELETA!
Quote:
Originally Posted by ipsLuan
Ou entгo, tenta tirar o stock da frente, jб vi casos similar.
|
Pra mim compilou normalmente
Re: Respuesta: Re: include strtok? -
C0D3Xexe - 09.07.2016
Quote:
Originally Posted by Kanuy
Vocк usou dessa forma?
Se for amigo... DELETA!
Pra mim compilou normalmente
|
agora foi
thx brothr
retirei o
e adicionei o
Код:
stock 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;
}
no final da GM