29.05.2011, 15:48
Ok, i got a problem with strtok
Error code:
C:\Users\Knut\Documents\My Received Files\massive.pwn(13514) : error 021: symbol already defined: "strtok"
C:\Users\Knut\Documents\My Received Files\massive.pwn(13529) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Lines:

Error code:
C:\Users\Knut\Documents\My Received Files\massive.pwn(13514) : error 021: symbol already defined: "strtok"
C:\Users\Knut\Documents\My Received Files\massive.pwn(13529) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Lines:
Quote:
strtok(const string[], &index) { new length = strlen(string); while ((index < length) && (string[index] <= ' ')) { index++; } 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; } public 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, 2 ![]() strdest[aNum][len] = 0; li = i+1; aNum++; } i++; } return 1; } |