symbol already defined: "strtok" - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: symbol already defined: "strtok" (
/showthread.php?tid=283984)
symbol already defined: "strtok" -
SA_Claude - 17.09.2011
Код 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!!
Re: symbol already defined: "strtok" -
Mikkel_Pedersen - 17.09.2011
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.
Re: symbol already defined: "strtok" -
SA_Claude - 18.09.2011
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
Re: symbol already defined: "strtok" -
[HiC]TheKiller - 18.09.2011
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.
Re: symbol already defined: "strtok" -
AustinJ - 18.09.2011
Or... Don't use strtok and use a new way such as sscanf.
Re: symbol already defined: "strtok" -
SA_Claude - 22.09.2011
ok thanks guys
Re: symbol already defined: "strtok" -
Samtwisting - 22.06.2016
how deleting the gl_common ? Am a noob help