Lines Help.
#1

Well, i've left scripting a year, i returned back and got some problems, any solution for this ?

Код:
                                                                 : error 021: symbol already defined: "strtok"
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(25130) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(26655) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(26715) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(26768) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(27436) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(27495) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(28176) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(28204) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(28215) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(28275) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(28544) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(28571) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(28601) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(28609) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(28643) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(28651) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(28684) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(28729) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(28792) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(28850) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(28858) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(28893) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(28901) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(29128) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mamoun\Desktop\New folder (3)\gamemodes\larp.pwn(29182) : error 047: array sizes do not match, or destination array is too small

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


26 Errors.
Reply
#2

Show the lines of error
Reply
#3

I've created an .amx for the file but when i run it gives me this :
Код:
SA-MP Dedicated Server
----------------------
v0.3z, ©2005-2014 SA-MP Team

[06:28:42] filterscripts = ""  (string)
[06:28:42] 
[06:28:42] Server Plugins
[06:28:42] --------------
[06:28:42]  Loaded 0 plugins.

[06:28:42] 
[06:28:42] Filterscripts
[06:28:42] ---------------
[06:28:42]   Loaded 0 filterscripts.

[06:28:42] Script[gamemodes/larp.amx]: Run time error 19: "File or function is not found"
[06:28:42] Number of vehicle models: 0
Reply
#4

Lines in your pwn where the errors are marked during compilation.
Reply
#5

Dude I ask you the script codes not the amx result go to your gm and copy the codes having error ,
Reply
#6

Yep, here :
Line 25115 the define error :
Код:
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;
}
Example of the other errors line 25130 :
Код:
	}
	result[index - offset] = EOS;
	return result;
}

public OnPlayerRegister(playerid, password[])
{
	if(IsPlayerConnected(playerid))
	{
		new string3[64];
The problem is strtok defined already, what's the solution ?
Reply
#7

Removing one of those, and better yet, not using strtok at all.
Reply
#8

This codes from Raven's role play btw..

Any other solution ?
Reply
#9

Make the string[64] ---->>> string[124]
Reply
#10

Strtok is already defined, remove one of them
And make the "string"-array bigger
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)