symbol already defined: "strtok"
#1

Код HTML:
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;
}
Код HTML:
D:\0.3c Server R5\gamemodes\SevenStar.pwn(68) : error 021: symbol already defined: "strtok"
Код HTML:
#include <a_samp>
#include "../include/gl_common.inc"

#include <sscanf>
#pragma tabsize 0
#include <float>
#include <dini>
#include <a_players>
#include <file>
#include <core>
HELP HELP HELP!!
Reply
#2

strtok is already created inside gl_common.inc. So I guess if you just remove the strtok code in your script and recompile, then it should work without errors.
Reply
#3

Quote:
Originally Posted by Mikkel_Pedersen
Посмотреть сообщение
strtok is already created inside gl_common.inc. So I guess if you just remove the strtok code in your script and recompile, then it should work without errors.
But I need this strtok code
Reply
#4

Quote:
Originally Posted by SA_Claude
Посмотреть сообщение
But I need this strtok code
You do not need it twice. Either delete it from your code or gl_common.inc.
Reply
#5

Or... Don't use strtok and use a new way such as sscanf.
Reply
#6

ok thanks guys
Reply
#7

how deleting the gl_common ? Am a noob help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)