Ysi Error
#1

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == REGISTER_D)
{
   if(!response) return Kick(playerid);
   if(response)
   {
	new INI:Fajl = INI_Open(IgraciPath(playerid));
	INI_SetTag(Fajl,"data");
        INI_WriteString(Fajl, "Lozinka", inputtext);
        INI_WriteInt(Fajl, "Porijeklo", P_Data[playerid][Porijeklo]);
        INI_WriteInt(Fajl, "Spol", P_Data[playerid][Spol]);
 	INI_Close(Fajl);
        SPD(playerid, SPOL_D, DSL, "Odaberite spol","Musko\nZensko", "Dalje", "Kick");
   }
}
if(dialogid == LOGIN_D)
{
   if(!response) return Kick(playerid);
   if(response)
   {
   if(!strcmp(inputtext, P_Data[playerid][Lozinka], false))
   {
       INI_ParseFile(IgraciPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
       SpawnPlayer(playerid);
   }
   else
   {
   if(loginpokusaji[playerid] == 0)
   {
         loginpokusaji[playerid]++;
         SPD(playerid, LOGIN_D, DSP,"Login","Unijeli ste pogresnu lozinku, upisite vasu lozinku za da se logujete na server(Imate jos 3 pokusaja)", "Login", "Kick");
   }
   else if(loginpokusaji[playerid] == 1)
   {
         loginpokusaji[playerid]++;
         SPD(playerid, LOGIN_D, DSP,"Login","Unijeli ste pogresnu lozinku, upisite vasu lozinku za da se logujete na server(Imate jos 2 pokusaja)", "Login", "Kick");
   }
   else if(loginpokusaji[playerid] == 2)
   {
         loginpokusaji[playerid]++;
         SPD(playerid, LOGIN_D, DSP,"Login","Unijeli ste pogresnu lozinku, upisite vasu lozinku za da se logujete na server(Imate jos 1 pokusaja)", "Login", "Kick");
   }
   else if(loginpokusaji[playerid] == 3)
   {
        SCM(playerid, -1, "Unijeli ste lozinku pogresno 3 puta zato ste {FFFF00}Kickovani {FFFFFF}od strane servera.");
        Kick(playerid);
   }
   }
   }
}
if(dialogid == SPOL_D)
{
   if(!response) Kick(playerid);
   if(response)
   {
   switch(listitem)
   {
   case 0:
   {
        P_Data[playerid][Pol] = 0;
        SCM(playerid, -1, "Uredu, musko ste.");
        SPD(playerid, PORIJEKLO_D, DSL, "Odabir porijekla", "BiH\nSrbija\nHrvatska", "Odaberi", "Kick");
   }
   case 1:
   {
        P_Data[playerid][Pol] = 1;
        SCM(playerid, -1, "Uredu, zensko ste.");
        SPD(playerid, PORIJEKLO_D, DSL, "Odabir porijekla", "BiH\nSrbija\nHrvatska", "Odaberi", "Kick");
   }
   }
   }
}
if(dialogid == PORIJEKLO_D)
{
   if(!response) Kick(playerid);
   if(response)
   {
   switch(listitem)
   {
   case 0:
   {
        P_Data[playerid][Porijeklo] = 0;
        SCM(playerid, -1, "Uredu, iz BiH ste.");
        SpawnPlayer(playerid);
   }
   case 1:
   {
        P_Data[playerid][Porijeklo] = 1;
        SCM(playerid, -1, "Uredu, iz Srbije ste.");
        SpawnPlayer(playerid);
   }
   case 2:
   {
        P_Data[playerid][Porijeklo] = 2;
        SCM(playerid, -1, "Uredu, iz Hrvatske ste.");
        SpawnPlayer(playerid);
   }
   }
   }
}
	return 1;
}
errors
Код:
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\filterscripts\YSI registracija.pwn(301) : error 017: undefined symbol "SPOL_D"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\filterscripts\YSI registracija.pwn(339) : error 017: undefined symbol "SPOL_D"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\filterscripts\YSI registracija.pwn(348) : error 017: undefined symbol "Pol"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\filterscripts\YSI registracija.pwn(350) : error 017: undefined symbol "PORIJEKLO_D"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\filterscripts\YSI registracija.pwn(354) : error 017: undefined symbol "Pol"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\filterscripts\YSI registracija.pwn(356) : error 017: undefined symbol "PORIJEKLO_D"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\filterscripts\YSI registracija.pwn(361) : error 017: undefined symbol "PORIJEKLO_D"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.
help
Reply
#2

Please update your YSI
Reply
#3

Those errors are not because of the YSI library. You are using undefined constants:
PHP код:
#define CONSTANT_NAME constant_value 
Reply
#4

Код:
#define PORIJEKLO_D 12345
#define SPOL_D         12346
This will work in most cases ^ but if does not,then find a unique dialog id for it.

And for this error:

Код:
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\filterscripts\YSI registracija.pwn(354) : error 017: undefined symbol "Pol"
Show your P_Data enum
Reply
#5

How many times do I have to say this?
You cannot use undefined symbols.Why?Becausew the script cannot read it, it does not exist so just define it already!The error practically told you what was wrong, I honestly don't see any purpose in helping you since you don't listen..
Reply
#6

tnx guys i fix it rep+ for I know where i do error
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)