[Ajuda] Meu GM da erro na hora de compilar..
#1

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.
Reply
#2

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.
Reply
#3

coloque isto pra ver se resolve

public OnPlayerCommandText(playerid, cmdtext[])
{
new
cmd[15],idx;
cmd = strtok(cmdtext, idx);
Reply
#4

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.
Reply
#5

Mande as linhas dos erros por favor.
Reply
#6

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;
}
Reply
#7

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));
Reply
#8

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.
Reply
#9

Mude a linha 6062 para

PHP код:
tmp strtok(cmdtextidx); 
Reply
#10

mande o codigo
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)