[Ajuda] Meu GM da erro na hora de compilar.. -
MatheusNunes - 05.03.2012
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2077) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2078) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2079) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2080) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2081) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2082) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2083) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2092) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2093) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2094) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2091) : warning 204: symbol is assigned a value that is never used: "index"
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2638) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2638) : error 033: array must be indexed (variable "cmd")
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2890) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2890) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2928) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2928) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2934) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2934) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2971) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2971) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2992) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(2992) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(3061) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(3061) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(3092) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(3092) : error 033: array must be indexed (variable "tmp")
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
26 Errors.
Re: Meu GM da erro na hora de compilar.. -
Đeagle - 05.03.2012
Coloque isso no final do seu GameMode
PHP код:
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;
}
Se te ajudei, clique na estrelinha (

) ao lado, assim me dando reputation.
Re: Meu GM da erro na hora de compilar.. -
demonneni - 05.03.2012
coloque isto pra ver se resolve
public OnPlayerCommandText(playerid, cmdtext[])
{
new
cmd[15],idx;
cmd = strtok(cmdtext, idx);
Re: Meu GM da erro na hora de compilar.. -
MatheusNunes - 05.03.2012
Coloquei e agora deu este erro:
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(6062) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(10087) : error 017: undefined symbol "set"
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(10094) : error 017: undefined symbol "set"
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(14219) : error 017: undefined symbol "StrToInt"
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(14242) : error 017: undefined symbol "StrToInt"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re: Meu GM da erro na hora de compilar.. -
Đeagle - 05.03.2012
Mande as linhas dos erros por favor.
Re: Meu GM da erro na hora de compilar.. -
demonneni - 05.03.2012
no final do gm
stock StrToInt(string[]) {
return strval(string);
}
stock set(dest[],source[]) {
new count = strlen(source);
new i=0;
for (i=0;i<count;i++) {
dest[i]=source[i];
}
dest[count]=0;
}
Re: Meu GM da erro na hora de compilar.. -
MatheusNunes - 05.03.2012
6062: tmp = strtok(cmdtext, idx, strlen(cmdtext));
10087: set(nome, tmp);
10094: set(cor1,tmp);
14219: dini_IntSet(string, "Cor1", StrToInt(inputtext));
14242: dini_IntSet(string, "Cor2", StrToInt(inputtext));
Re: Meu GM da erro na hora de compilar.. -
MatheusNunes - 05.03.2012
demonneni,
Deu certo mais como tira o warning ?
C:\Documents and Settings\Matheus\Desktop\BVR.pwn(6062) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Header size: 4788 bytes
Code size: 592504 bytes
Data size: 776128 bytes
Stack/heap size: 16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 1389804 bytes
1 Warning.
Re: Meu GM da erro na hora de compilar.. -
Đeagle - 05.03.2012
Mude a linha 6062 para
PHP код:
tmp = strtok(cmdtext, idx);
Re: Meu GM da erro na hora de compilar.. -
demonneni - 05.03.2012
mande o codigo