Posts: 69
Threads: 15
Joined: Aug 2010
Reputation:
0
Compile Probleam
C:\Users\MarioG\Desktop\Server\gamemodes\CM.pwn(10 62) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Please help me!
Posts: 69
Threads: 15
Joined: Aug 2010
Reputation:
0
What code? srry im new to scripting
Posts: 2,421
Threads: 52
Joined: Mar 2009
Reputation:
0
Post line 1062 of your code. Maybe few lines above and below too. The error is because you are using an incorrect size array.
Posts: 69
Threads: 15
Joined: Aug 2010
Reputation:
0
ok This is line 1046 - 1072
format(string, sizeof(string),"%s [TeamChat]: %s", playername, gangChat);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(gTeam[i] == gTeam[playerid])
{
SendClientMessage(i, COLOR_YELLOW, string);
}
}
return 0;
}
return 1;
}
dcmd_spec(playerid, params[])
{
new tmp[MAX_STRING];
new index = 0;
tmp = strtok(params, index);
if(!strlen(tmp))
{
SystemMessage(playerid, "USAGE: /spec [ID]");
return 1;
}
new string[MAX_STRING];
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
format(string, sizeof(string), "%s is spectating %s.", PlayerN(playerid), PlayerN(giveplayerid)));
Posts: 2,421
Threads: 52
Joined: Mar 2009
Reputation:
0
Is the error on the format line?
Posts: 69
Threads: 15
Joined: Aug 2010
Reputation:
0
what? dunno thats the error that shows up when i compile:
C:\Users\MarioG\Desktop\Server\gamemodes\CM.pwn(10 62) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Posts: 69
Threads: 15
Joined: Aug 2010
Reputation:
0
ok listen this line 1062
tmp = strtok(params, index);
i tried to remove it then compile and it worked. so how can i compile it with the line 1062 > what shall i do