just 2 error
#1

Код:
C:\Users\samet\Desktop\DMZONEv2.pwn(738) : error 047: array sizes do not match, or destination array is too small
C:\Users\samet\Desktop\DMZONEv2.pwn(751) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.

Код:
  cmd = strtok(cmdtext, idx);
  if(strcmp(cmd,"/hdf",true)==0)
	{
	  if(!IsPlayerAdmin(playerid))return 0;
	  new tmp1[64],id;
	  tmp1=strtok(cmdtext,idx);
	  if(!strlen(tmp1)) return 0;
	  id=strval(tmp1);
	  Muted[id]=1;
	  new string1[128];
	  format(string1,sizeof(string1),"** %s set's to HDF list.",PlayerName(id));
	  SendClientMessage(playerid,COLOR_LIMEGREEN,string1);
	  return 1;
	}
		if(strcmp(cmd,"/unhdf",true)==0)
	{
	  if(!IsPlayerAdmin(playerid))return 0;
	  new tmp1[64],id;
	  tmp1=strtok(cmdtext,idx);
	  if(!strlen(tmp1)) return 0;
	  id=strval(tmp1);
	  Muted[id]=0;
	  new string1[128];
	  format(string1,sizeof(string1),"** %s revoked from HDF list.",PlayerName(id));
	  SendClientMessage(playerid,COLOR_LIMEGREEN,string1);
	  return 1;
	}
tmp already using and i changed tmp to tmp1


Reply
#2

make, "tmp1[64]" to "tmp1[128]"
Reply
#3

Quote:
Originally Posted by N000000b :)
make, "tmp1[64]" to "tmp1[128]"
got same errors nothing changed
Reply
#4

new tmp1[256];
Reply
#5

Quote:
Originally Posted by Jeffry
new tmp1[256];
thanks got no errors i will trying gamemode now
Reply
#6

Quote:
Originally Posted by by_karizma
Quote:
Originally Posted by Jeffry
new tmp1[256];
thanks got no errors i will trying gamemode now
You always need the 256 when you call strtok in a command.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)