Split problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Split problem (
/showthread.php?tid=529105)
Split problem -
xGame - 31.07.2014
Код:
new money;
new score;
new nick[250];
new resultline[512];
mysql_fetch_row_format(resultline);
new tmp[2][14];
split(resultline, tmp, "|");
nick = tmp[0];
Info[playerid][Pass] = tmp[1];
Info[playerid][Adminlevel] = tmp[2];
money = tmp[3];
score = tmp[3];
Info[playerid][Kills] = tmp[4];
Info[playerid][Deaths] = tmp[5];
Info[playerid][Mutato] = tmp[6];
Info[playerid][Warnato] = tmp[7];
Info[playerid][Loggato] = tmp[8];
Info[playerid][Bannato] = tmp[9];
Info[playerid][Cmdblock] = tmp[10];
Info[playerid][PEuro] = tmp[11];
Info[playerid][PSkin] = tmp[12];
SPLIT CODE
Код HTML:
stock split(const strsrc[], strdest[][], delimiter)
{
new i, li;
new aNum;
new len;
while(i <= strlen(strsrc))
{
if(strsrc[i] == delimiter || i == strlen(strsrc))
{
len = strmid(strdest[aNum], strsrc, li, i, 128);
strdest[aNum][len] = 0;
li = i+1;
aNum++;
}
i++;
}
return 1;
}
ERROR:
Код HTML:
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7579) : error 035: argument type mismatch (argument 3)
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7581) : error 047: array sizes do not match, or destination array is too small
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7582) : error 032: array index out of bounds (variable "tmp")
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7582) : error 006: must be assigned to an array
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7583) : error 032: array index out of bounds (variable "tmp")
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7583) : error 006: must be assigned to an array
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7584) : error 032: array index out of bounds (variable "tmp")
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7584) : error 006: must be assigned to an array
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7585) : error 032: array index out of bounds (variable "tmp")
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7585) : error 006: must be assigned to an array
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7586) : error 032: array index out of bounds (variable "tmp")
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7586) : error 006: must be assigned to an array
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7587) : error 032: array index out of bounds (variable "tmp")
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7587) : error 006: must be assigned to an array
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7588) : error 032: array index out of bounds (variable "tmp")
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7588) : error 006: must be assigned to an array
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7589) : error 032: array index out of bounds (variable "tmp")
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7589) : error 006: must be assigned to an array
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7590) : error 032: array index out of bounds (variable "tmp")
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7590) : error 006: must be assigned to an array
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7591) : error 032: array index out of bounds (variable "tmp")
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7591) : error 006: must be assigned to an array
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7592) : error 032: array index out of bounds (variable "tmp")
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7592) : error 006: must be assigned to an array
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7593) : error 032: array index out of bounds (variable "tmp")
C:\Users\Andrea\Desktop\Cartelle\IbP\gamemodes\CwS.pwn(7593) : error 006: must be assigned to an array