error 052: multi-dimensional arrays must be fully initialized
#1

ERROR:
Code:
(9) : error 052: multi-dimensional arrays must be fully initialized
ERROR IN LINE:
Code:
};
CODE:
Code:
#include <a_samp>
#define COLOR_LIGHTRED 0xFF6347AA

#define MAX_REKLAAME 50

new Reklaamid[MAX_REKLAAME][256] = {
"evm.pri.ee",
"thezone.pri.ee"
};

public OnFilterScriptInit()
{
  return 1;
}

stock OtsiReklaame(text[])
{
  for(new i = 0; i < MAX_REKLAAME; i++)
    if(strfind(text, Reklaamid[i]) != -1) return 1;
  return 0;
}

public OnPlayerText(playerid, text[])
{
  if(OtsiReklaame(text)) return Ban(playerid);
  return 1;
}

public OnPlayerPrivmsg(playerid, recieverid, text[])
{
  if(OtsiReklaame(text))
  {
    new pName[MAX_PLAYER_NAME], string[56];
    GetPlayerName(playerid, pName, sizeof(pName));
    format(string, sizeof(string), "%s on bдnnitud KAITSE poolt, Pхhjus: Reklaamimine.", pName);
    SendClientMessageToAll(COLOR_LIGHTRED, string);
    Ban(playerid);
    return 0;
  }
  return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
  if(OtsiReklaame(cmdtext)) return Ban(playerid);
  return 0;
}
Reply
#2


Code:
#define MAX_REKLAAME 2
Reply
#3

or simply replace
Code:
new Reklaamid[MAX_REKLAAME][256] = {
with
Code:
new Reklaamid[][] = {
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)