SA-MP Forums Archive
preoblem with script - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: preoblem with script (/showthread.php?tid=67307)



preoblem with script - Selluliitti_mies - 28.02.2009

i have this script:
Code:
  new cmd[128];
	new tmp[128];
	new idx;
	new giveplayername[MAX_PLAYER_NAME];
	new sendername[MAX_PLAYER_NAME];
	new string[128];
	cmd = strtok(cmdtext,idx);   // Line 1881

	for(new i = 0; i < GetMaxPlayers(); i++)
	{
	  if (IsPlayerConnected(i))
	  {
	    if (AccountInfo[i][AdminLevel] > 0 && ViewCmds[i] == 1)
	    {
	      for(new v = 0; v < sizeof(ViewCommands); v++) if (!strcmp(cmdtext, ViewCommands[v], true))
	      {
	        GetPlayerName(playerid, sendername, sizeof sendername);
	        format(tmp, 128, "[VIEWCMDS] [%d]%s: %s", playerid, sendername, cmdtext);
	        SendClientMessage(i, PURPLE, tmp);
	      }
	    }
	  }
	}
and i have this error:
Code:
G:\samp\1111.pwn(1881) : error 047: array sizes do not match, or destination array is too small
so what is problem on this?


Re: preoblem with script - Burridge - 28.02.2009




where the new cmd[128]; is make it line up with the rest.

Always works for me


Re: preoblem with script - Selluliitti_mies - 28.02.2009

It is right place in code but not there weird
but it not help but thanks for trying


Re: preoblem with script - Burridge - 28.02.2009

hmm, i dont knwo then, sorry




Re: preoblem with script - Selluliitti_mies - 28.02.2009

then i have to wait