24.04.2010, 14:40
I am use fuction samp_mysql_strtok
code...
Result...
What is wrong?
Sorry i'm bad for english
code...
pawn Код:
new gangmember[15][128];
new Data[1024];
new Field[64];
new rcnt = 1;
MySQLFetchGangRecord(PlayerInfo[playerid][pGID], Data);
samp_mysql_strtok(Field, "|", Data);
while (samp_mysql_strtok(Field, "|", "")==1)
{
if (rcnt == 7) gangmember[0] = strmid(gangmember[0], Field, 0, strlen(Field)-1, 255);
if (rcnt == 8) gangmember[1] = strmid(gangmember[1], Field, 0, strlen(Field)-1, 255);
if (rcnt == 9) gangmember[2] = strmid(gangmember[2], Field, 0, strlen(Field)-1, 255);
if (rcnt == 10) gangmember[3] = strmid(gangmember[3], Field, 0, strlen(Field)-1, 255);
if (rcnt == 11) gangmember[4] = strmid(gangmember[4], Field, 0, strlen(Field)-1, 255);
if (rcnt == 12) gangmember[5] = strmid(gangmember[5], Field, 0, strlen(Field)-1, 255);
if (rcnt == 13) gangmember[6] = strmid(gangmember[6], Field, 0, strlen(Field)-1, 255);
if (rcnt == 14) gangmember[7] = strmid(gangmember[7], Field, 0, strlen(Field)-1, 255);
if (rcnt == 15) gangmember[8] = strmid(gangmember[8], Field, 0, strlen(Field)-1, 255);
if (rcnt == 16) gangmember[9] = strmid(gangmember[9], Field, 0, strlen(Field)-1, 255);
if (rcnt == 17) gangmember[10] = strmid(gangmember[10], Field, 0, strlen(Field)-1, 255);
if (rcnt == 18) gangmember[11] = strmid(gangmember[11], Field, 0, strlen(Field)-1, 255);
if (rcnt == 19) gangmember[12] = strmid(gangmember[12], Field, 0, strlen(Field)-1, 255);
if (rcnt == 20) gangmember[13] = strmid(gangmember[13], Field, 0, strlen(Field)-1, 255);
if (rcnt == 21) gangmember[14] = strmid(gangmember[14], Field, 0, strlen(Field)-1, 255);
rcnt++;
}
Код:
D:\xxx\gamemodes\xxx.pwn(18590) : error 033: array must be indexed (variable "gangmember") D:\xxx\gamemodes\xxx.pwn(18591) : error 033: array must be indexed (variable "gangmember") D:\xxx\gamemodes\xxx.pwn(18592) : error 033: array must be indexed (variable "gangmember") D:\xxx\gamemodes\xxx.pwn(18593) : error 033: array must be indexed (variable "gangmember") D:\xxx\gamemodes\xxx.pwn(18594) : error 033: array must be indexed (variable "gangmember") D:\xxx\gamemodes\xxx.pwn(18595) : error 033: array must be indexed (variable "gangmember") D:\xxx\gamemodes\xxx.pwn(18596) : error 033: array must be indexed (variable "gangmember") D:\xxx\gamemodes\xxx.pwn(18597) : error 033: array must be indexed (variable "gangmember") D:\xxx\gamemodes\xxx.pwn(18598) : error 033: array must be indexed (variable "gangmember") D:\xxx\gamemodes\xxx.pwn(18599) : error 033: array must be indexed (variable "gangmember") D:\xxx\gamemodes\xxx.pwn(18600) : error 033: array must be indexed (variable "gangmember") D:\xxx\gamemodes\xxx.pwn(18601) : error 033: array must be indexed (variable "gangmember") D:\xxx\gamemodes\xxx.pwn(18602) : error 033: array must be indexed (variable "gangmember") D:\xxx\gamemodes\xxx.pwn(18603) : error 033: array must be indexed (variable "gangmember") D:\xxx\gamemodes\xxx.pwn(18604) : error 033: array must be indexed (variable "gangmember") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 15 Errors.
Sorry i'm bad for english