CMD:test(playerid,params[]) { kickle(playerid,"ı ğ ь ş ц з"); return 1; } stock code(nickname[]) { new tmp[MAX_STRING]; set(tmp,nickname); tmp=strreplace("ğ","g",tmp); tmp=strreplace("Ğ","G",tmp); tmp=strreplace("ş","s",tmp); tmp=strreplace("Ş","S",tmp); tmp=strreplace("ı","i",tmp); tmp=strreplace("I","I",tmp); tmp=strreplace("İ","I",tmp); tmp=strreplace("ц","o",tmp); tmp=strreplace("Ц","O",tmp); tmp=strreplace("з","c",tmp); tmp=strreplace("З","C",tmp); tmp=strreplace("ь","u",tmp); tmp=strreplace("Ь","U",tmp); return tmp; } stock kickle(playerid, string[]) { new Years, Months, Days,estring[250]; getdate(Years, Months, Days); format(estring,sizeof(estring),"{993366}Kickleyen Admin:\t\t{FFFFFF}Anti Hile\n{993366}Sebep:\t\t\t\t{FFFFFF}%s\n{993366}Tarih:\t\t\t\t{FFFFFF}%02d/%02d/%d", string, Days, Months, Years); ShowPlayerDialog(playerid,123,DIALOG_STYLE_MSGBOX,"{47C9F5}« xPro Gaming » {ffffff}Anti Hile - Kick",estring,"Tamam",""); format(textmesaj,250,"~g~~h~~h~[Anti Hile] ~r~~h~~h~%s(%d) ~w~~h~adli oyuncu sunucudan atildi. Sebep: ~y~~h~%s",getName(playerid),playerid,code(string)); Textdrawyazi(-1, textmesaj); printf("\n%s(%d) >> kicklendi. Sebep: %s\n",getName(playerid),playerid,code(string)); Kick(playerid); return 1; }
D:\Server\Server\gamemodes\xPro.pwn(30605) : error 017: undefined symbol "MAX_STRING" D:\Server\Server\gamemodes\xPro.pwn(30605) : error 009: invalid array size (negative, zero or out of bounds) D:\Server\Server\gamemodes\xPro.pwn(30605) : error 036: empty statement D:\Server\Server\gamemodes\xPro.pwn(30605) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
#define MAX_STRING 256 stock strreplace(trg[],newstr[],src[]) { new f=0; new s1[MAX_STRING]; new tmp[MAX_STRING]; format(s1,sizeof(s1),"%s",src); f = strfind(s1,trg); tmp[0]=0; while (f>=0) { strcat(tmp,ret_memcpy(s1, 0, f)); strcat(tmp,newstr); format(s1,sizeof(s1),"%s",ret_memcpy(s1, f+strlen(trg), strlen(s1)-f)); f = strfind(s1,trg); } strcat(tmp,s1); return tmp; } ret_memcpy(source[],index=0,numbytes) { new tmp[MAX_STRING]; new i=0; tmp[0]=0; if (index>=strlen(source)) return tmp; if (numbytes+index>=strlen(source)) numbytes=strlen(source)-index; if (numbytes<=0) return tmp; for (i=index;i<numbytes+index;i++) { tmp[i-index]=source[i]; if (source[i]==0) return tmp; } tmp[numbytes]=0; return tmp; } stock set(dest[],source[]) { new count = strlen(source); new i=0; for (i=0;i<count;i++) { dest[i]=source[i]; } dest[count]=0; }
#define MAX_STRING 255
have you defined MAX_STRING at start of your code?
PHP код:
|
D:\Server\Server\gamemodes\xPro.pwn(30607) : error 017: undefined symbol "set" D:\Server\Server\gamemodes\xPro.pwn(30608) : error 033: array must be indexed (variable "tmp") D:\Server\Server\gamemodes\xPro.pwn(30609) : error 033: array must be indexed (variable "tmp") D:\Server\Server\gamemodes\xPro.pwn(30610) : error 033: array must be indexed (variable "tmp") D:\Server\Server\gamemodes\xPro.pwn(30611) : error 033: array must be indexed (variable "tmp") D:\Server\Server\gamemodes\xPro.pwn(30612) : error 033: array must be indexed (variable "tmp") D:\Server\Server\gamemodes\xPro.pwn(30613) : error 033: array must be indexed (variable "tmp") D:\Server\Server\gamemodes\xPro.pwn(30614) : error 033: array must be indexed (variable "tmp") D:\Server\Server\gamemodes\xPro.pwn(30615) : error 033: array must be indexed (variable "tmp") D:\Server\Server\gamemodes\xPro.pwn(30616) : error 033: array must be indexed (variable "tmp") D:\Server\Server\gamemodes\xPro.pwn(30617) : error 033: array must be indexed (variable "tmp") D:\Server\Server\gamemodes\xPro.pwn(30618) : error 033: array must be indexed (variable "tmp") D:\Server\Server\gamemodes\xPro.pwn(30619) : error 033: array must be indexed (variable "tmp") D:\Server\Server\gamemodes\xPro.pwn(30620) : error 033: array must be indexed (variable "tmp") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 14 Errors.