[HELP] error 017: undefined symbol "MAX_STRING"
#1

Code:
C:\Users\KONT\KONT\KONT - 2016\gamemodes\KONT2016.pwn(13778) : error 017: undefined symbol "MAX_STRING"
C:\Users\KONT\KONT\KONT - 2016\gamemodes\KONT-2016.pwn(13778) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\KONT\KONT\KONT- 2016\gamemodes\KONT-2016.pwn(13778) : error 036: empty statement
C:\Users\KONT\KONT\KONT - 2016\gamemodes\KONT-2016.pwn(13778) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
4 Errors.


Code:
stock code(nickname[]) {
  new tmpb[MAX_STRING];
  set(tmpb,nickname);
  tmpb=strreplace("ğ","g",tmpb);
  tmpb=strreplace("Ğ","G",tmpb);
  tmpb=strreplace("ş","s",tmpb);
  tmpb=strreplace("Ş","S",tmpb);
  tmpb=strreplace("ı","i",tmpb);
  tmpb=strreplace("I","I",tmpb);
  tmpb=strreplace("İ","I",tmpb);
  tmpb=strreplace("ц","o",tmpb);
  tmpb=strreplace("Ц","O",tmpb);
  tmpb=strreplace("з","c",tmpb);
  tmpb=strreplace("З","C",tmpb);
  tmpb=strreplace("ь","u",tmpb);
  tmbp=strreplace("Ь","U",tmpb);
  return tmpb;
}
Reply
#2

These error occurs if you do not have dutils.inc included. Functions like strreplace(), set() etc... are inside that include and so does MAX_STRING definition.
Reply
#3

Change
HTML Code:
new tmpb[MAX_STRING];
with
HTML Code:
new tmpb[32];
or add
HTML Code:
#define MAX_STRING 32
Reply
#4

Quote:
Originally Posted by Nin9r
View Post
Change
HTML Code:
new tmpb[MAX_STRING];
with
HTML Code:
new tmpb[32];
or add
HTML Code:
#define MAX_STRING 32
Code:
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13780) : error 017: undefined symbol "set"
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13781) : error 017: undefined symbol "strreplace"
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13781) : error 033: array must be indexed (variable "tmpb")
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13782) : error 017: undefined symbol "strreplace"
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13782) : error 033: array must be indexed (variable "tmpb")
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13783) : error 017: undefined symbol "strreplace"
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13783) : error 033: array must be indexed (variable "tmpb")
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13784) : error 017: undefined symbol "strreplace"
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13784) : error 033: array must be indexed (variable "tmpb")
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13785) : error 017: undefined symbol "strreplace"
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13785) : error 033: array must be indexed (variable "tmpb")
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13786) : error 017: undefined symbol "strreplace"
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13786) : error 033: array must be indexed (variable "tmpb")
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13787) : error 017: undefined symbol "strreplace"
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13787) : error 033: array must be indexed (variable "tmpb")
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13788) : error 017: undefined symbol "strreplace"
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13788) : error 033: array must be indexed (variable "tmpb")
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13789) : error 017: undefined symbol "strreplace"
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13789) : error 033: array must be indexed (variable "tmpb")
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13790) : error 017: undefined symbol "strreplace"
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13790) : error 033: array must be indexed (variable "tmpb")
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13791) : error 017: undefined symbol "strreplace"
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13791) : error 033: array must be indexed (variable "tmpb")
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13792) : error 017: undefined symbol "strreplace"
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13792) : error 033: array must be indexed (variable "tmpb")
C:\Users\Batuhan\Desktop\ALATURKA - 2016\gamemodes\Alaturka-2016.pwn(13793) : error 017: undefined symbol "tmbp"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Reply
#5

Quote:
Originally Posted by Sjn
View Post
These error occurs if you do not have dutils.inc included. Functions like strreplace(), set() etc... are inside that include and so does MAX_STRING definition.
Can you read what Snj wrote ?
Reply
#6

Code:
stock code(nickname[])
{
    new tmpb[32];
    strcat(tmpb, nickname);	
    for (new i = 0; i < 32; i++)
    {
	switch (tmpb[i])
        {
            case 'ğ': tmpb[i] = 'g';
            case 'Ğ': tmpb[i] = 'G';
	    case 'ş': tmpb[i] = 's';
	    case 'Ş': tmpb[i] = 'S';
	    case 'ı': tmpb[i] = 'i';
	    case 'ц': tmpb[i] = 'o';
	    case 'Ц': tmpb[i] = 'O';
	    case 'з': tmpb[i] = 'c';
	    case 'З': tmpb[i] = 'C';
	    case 'ь': tmpb[i] = 'u';
	    case 'Ь': tmpb[i] = 'U';
 	    case 'İ': tmpb[i] = 'I';
	}
    }
    return tmpb;
}
No need for dutils.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)