Quote:
Originally Posted by SharkyKH
pawn Код:
new text[128],string[128];
They are created but empty.
Use 'strtok'.
pawn Код:
new text[128], string[128], idx; text = strtok(params, idx); string = strtok(params, idx);
STRTOK Function:
pawn Код:
stock strtok(const string[], &index, seperator=' ') { new length = strlen(string); new offset = index; new result[127]; while ((index < length) && (string[index] != seperator) && ((index - offset) < (sizeof(result) - 1))) { result[index - offset] = string[index]; index++; }
result[index - offset] = EOS; if ((index < length) && (string[index] == seperator)) { index++; } return result; }
|
The whole point in using dcmd is so i don't have to use strtok and pen_†ĥęGun it works perfectly, thanks.
And no they aren't Sharky, the strings are formatting just fine.