08.12.2013, 15:26
Quote:
|
a) Do you receive any warnings upon compiling the script?
b) Show us your "explode" function. |
Wow, that was fast.
Код:
Header size: 25716 bytes Code size: 2269044 bytes Data size: 3626860 bytes Stack/heap size: 16384 bytes; estimated max. usage: unknown, due to recursion Total requirements: 5938004 bytes
pawn Код:
explode(const sSource[], aExplode[][], const sDelimiter[] = " ", iVertices = sizeof aExplode, iLength = sizeof aExplode[]) // Created by Westie
{
new
iNode,
iPointer,
iPrevious = -1,
iDelimiter = strlen(sDelimiter);
while(iNode < iVertices)
{
iPointer = strfind(sSource, sDelimiter, false, iPointer);
if(iPointer == -1)
{
strmid(aExplode[iNode], sSource, iPrevious, strlen(sSource), iLength);
break;
}
else
{
strmid(aExplode[iNode], sSource, iPrevious, iPointer, iLength);
}
iPrevious = (iPointer += iDelimiter);
++iNode;
}
return iPrevious;
}


