Jump to content
  • 0

Undefined symbol srtrok & array must be indexed (variable "tmp")


SiNuS

Question

[pawn]C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(10165) : error 017: undefined symbol "GetDistanceBetweenPlayers"

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(11810) : error 017: undefined symbol "strtok"

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(11810) : error 033: array must be indexed (variable "cmd")

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(11895) : error 017: undefined symbol "strtok"

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(11895) : error 033: array must be indexed (variable "tmp")

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(11947) : error 017: undefined symbol "strtok"

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(11947) : error 033: array must be indexed (variable "tmp")

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(12035) : error 017: undefined symbol "strtok"

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(12035) : error 033: array must be indexed (variable "x_nr")

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(12053) : error 017: undefined symbol "strtok"

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(12053) : error 033: array must be indexed (variable "tmp")

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(12090) : error 017: undefined symbol "strtok"

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(12090) : error 033: array must be indexed (variable "tmp")

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(12158) : error 017: undefined symbol "strtok"

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(12158) : error 033: array must be indexed (variable "x_nr")

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(12176) : error 017: undefined symbol "strtok"

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(12176) : error 033: array must be indexed (variable "tmp")

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(12213) : error 017: undefined symbol "strtok"

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(12213) : error 033: array must be indexed (variable "tmp")

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(12267) : error 017: undefined symbol "strtok"

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(12267) : error 033: array must be indexed (variable "tmp")

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(12280) : error 017: undefined symbol "strtok"

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(12280) : error 033: array must be indexed (variable "tmp")

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(12355) : error 017: undefined symbol "strtok"

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(12355) : error 033: array must be indexed (variable "tmp")

C:\Documents and Settings\andrei\Desktop\dG^\gamemodes\dG^.pwn(12544) : error 017: undefined symbol "strtok"

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

26 Errors.[/pawn]

Pana acum s-a compilat perfect , acum nu stiu ce a patit

userbar6.jpg
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Adaugale in FS sau GM.

undefined symbol "strtok":

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;
}
undefined symbol "GetDistanceBetweenPlayers":
forward Float:GetDistanceBetweenPlayers(playerid,targetplayerid);

public Float:GetDistanceBetweenPlayers(playerid,targetplayerid)
{
    new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
    if(!IsPlayerConnected(playerid) || !IsPlayerConnected(targetplayerid)) {
        return -1.00;
    }
    GetPlayerPos(playerid,x1,y1,z1);
    GetPlayerPos(targetplayerid,x2,y2,z2);
    return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
}

i0418xcttya707ofg.jpg

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.