#1

I dont really know what i need to fix here, im also new to scripting, can anyone help?

Errors what im getting:

Код:
C:\Users\MrMathiasxP\Desktop\samp rp\gamemodes\rp.pwn(24863) : error 021: symbol already defined: "strtok"
C:\Users\MrMathiasxP\Desktop\samp rp\gamemodes\rp.pwn(24863) : error 003: declaration of a local variable must appear in a compound block
C:\Users\MrMathiasxP\Desktop\samp rp\gamemodes\rp.pwn(24862) : error 010: invalid function or declaration
C:\Users\MrMathiasxP\Desktop\samp rp\gamemodes\rp.pwn(24862 -- 24864) : fatal error 107: too many error messages on one line
Code:

Код:
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, 128);
	        strdest[aNum][len] = 0;
	        li = i+1;
	        aNum++;
		}
		i++;
	}
	return 1;
}

	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;
}
- Thanks.
Reply


Messages In This Thread
Help - by MrMathiasxP - 19.06.2015, 11:05
Re: Help - by J0sh... - 19.06.2015, 11:27
Re: Help - by MrMathiasxP - 19.06.2015, 12:29

Forum Jump:


Users browsing this thread: 1 Guest(s)