[HELP] Errors when added Dini.inc
#1

Quote:

C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1544) : error 017: undefined symbol "strtok"
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1544) : error 033: array must be indexed (variable "tmp")
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1576) : error 017: undefined symbol "strtok"
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1576) : error 033: array must be indexed (variable "tmp")
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1575) : warning 203: symbol is never used: "idx2"
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1543) : warning 203: symbol is never used: "idx"
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1697) : error 017: undefined symbol "strtok"
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1697) : error 033: array must be indexed (variable "cmd")
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1723) : error 017: undefined symbol "strtok"
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1723) : error 033: array must be indexed (variable "tmp")
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1732) : error 017: undefined symbol "strtok"
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1732) : error 033: array must be indexed (variable "tmp")
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1860) : error 017: undefined symbol "strtok"
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1860) : error 033: array must be indexed (variable "tmp")
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1887) : error 017: undefined symbol "strtok"
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1887) : error 033: array must be indexed (variable "tmp")
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1897) : error 017: undefined symbol "strtok"
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1897) : error 033: array must be indexed (variable "tmp")
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1923) : error 017: undefined symbol "strtok"
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1923) : error 033: array must be indexed (variable "tmp")
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1933) : error 017: undefined symbol "strtok"
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1933) : error 033: array must be indexed (variable "tmp")
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1959) : error 017: undefined symbol "strtok"
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1959) : error 033: array must be indexed (variable "tmp")
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1973) : error 017: undefined symbol "strtok"
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(1973) : error 033: array must be indexed (variable "tmp")
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(2001) : error 017: undefined symbol "strtok"
C:\Users\Hampus\Desktop\Carlito's Roleplay\gamemodes\crp.pwn(2001) : error 033: array must be indexed (variable "tmp")

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.

Help, please?
Reply
#2

Add this somewhere under the defines( Usually above OnGameModeInit() )
Код:
stock 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;
}
Peace
Reply
#3

I have.
Quote:

#include <a_samp>
#include <core>
#include <float>
#include <time>
#include <file>
#include <Dini>

When I putted the Dini.inc in pawno/include I got the errors.
Reply
#4

Somewhere in the Dini file i think there already is included strtok, try removing the one i asked you to put there that already was there, Peace
Reply
#5

Isen't it better to remove strtok from your script then from the dini-file? I think that it still work after that.
Reply
#6

I didn't put the,
Quote:

#include <Dini>

,
It was already there when I downloaded the GM.
Reply
#7

I mean that he should remove Strtok from the script, not the include file.
Reply
#8

What "strtok"?

Help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)