Jump to content
  • 0

Problema simbol PlayerName


KingZone

Question

Problema intalnita (descriere):Primesc acest warning decand am adaugat in gmul meu functia stock Playername nu stiu ce sa mai putea face am incercat foarte multe dar in zadar aceas eroare vreau sa imi explicati daca se poate ce am gresit.Este vorba de un sistem de report cu comenzile /report=dialog cu obtiuni.
Ero(area / rile) / warning-(ul / urile):warning 219: local variable "PlayerName" shadows a variable at a preceding level
Liniile de cod / sursa / script-ul(obligatoriu):

//======================Report System=========================================//
#define DIALOG_REPORT 12345 // dialog report
#define DIALOG_REPORTJUCATOR 23456 // dialog raporteaza jucator
#define DIALOG_AJUTOR 23457 // dialog ajutor / probleme
#define DIALOG_BUG 23458 // dialog semnaleaza bug
#define DIALOG_INAPOI 23459 // dialog mesaj esti sigur ca vrei sa inchizi.
#define DIALOG_BLOCAT 23460 // dialog mesaj esti sigur ca vrei sa inchizi
#define DIALOG_VAD 23461 // dialog mesaj esti sigur ca vrei sa inchizi
#define DIALOG_PIERDUT 23462 // dialog mesaj esti sigur ca vrei sa inchizi
#define DIALOG_ALTA 23463 // dialog mesaj esti sigur ca vrei sa inchizi

//Comenzi Report
 if(strcmp(cmd, "/report", true) == 0)
    {
	ShowPlayerDialog(playerid,DIALOG_REPORT,DIALOG_STYLE_LIST,"{0066FF}AfterSchool RPG {FFFFFF}Report {0066FF}System","{0066FF}1.{FFFFFF}Raporteaza un jucator.\n{0066FF}2.{FFFFFF}Ajutor / Probleme.\n{0066FF}3.{FFFFFF}Raporteaza un BUG.\n{0066FF}4.{FFFFFF}M-am blocat.\n{0066FF}5.{FFFFFF}Nu vad nimic.\n{0066FF}6.{FFFFFF}Am pierdut un bun personal.\n{0066FF}7.{FFFFFF}Alte probleme.","Select","Cancel");
	return 1;
    }
   if(strcmp(cmd, "/openreport", true) == 0 || strcmp(cmd, "/opr", true) == 0)
   {
     if(IsPlayerConnected(playerid))
     {
       if(P_DATA[playerid][pHelper] >= 1 || P_DATA[playerid][pAdmin] >= 1)
       {
          GetPlayerName(playerid, sendername, sizeof(sendername));
          tmp = strtok(cmdtext, idx);
          if(!strlen(tmp))
          {
            SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF}: /opr [playerid/PartOfName]");
            return 1;
          }
          new idplayer;
          idplayer = ReturnUser(tmp);
          new numeplayer[182];
          GetPlayerName(idplayer, numeplayer, sizeof(numeplayer));
          if(IsPlayerConnected(idplayer))
          {
            if(idplayer != INVALID_PLAYER_ID)
            {
              if (idplayer == playerid)
              {
                SendClientMessage(playerid, COLOR_WHITE, "Nu iti poti da /opr singur.");
                return 1;
              }
              if(GetPVarInt(idplayer, "Report") == 1)
              {
                format(string,sizeof(string),"** Administratorul{0066FF} %s {FFFFFF}a deschis reportul dvs.Live chat-ul a fost activat! Folositi (/rc).", sendername, numeplayer);
                SendClientMessage(idplayer,COLOR_WHITE,string);
                SendClientMessage(playerid,COLOR_WHITE,"[REPORT]: Reportul a fost deschis! Pentru a vorbi in live chat folositi {0066FF}(/ra).");
                SetPVarInt(playerid,"LiveChat",1);
                SetPVarInt(idplayer,"LiveChat",1);
                SetPVarInt(idplayer,"Report",0);
                SetPVarInt(playerid,"RJucator",idplayer);
                SetPVarInt(idplayer,"RJucator",playerid);
                format(string, sizeof(string), "{0066FF}%s {B9E1EB}a raspuns cererii de ajutor a lui{0066FF} %s", sendername, numeplayer);
                ABroadCast(COLOR_YELLOW, string,1);
              }
              else
              {
                SendClientMessage(playerid, COLOR_GRAD1, "[Anti-Abuz] Acel player nu a cerut ajutor!");
              }
            }
          }
          else
          {
            SendClientMessage(playerid, COLOR_GRAD1, "Acel jucator nu este conectat.");
          }
        }
      }
      return 1;
    }
 if(strcmp(cmd, "/closereport", true) == 0 || strcmp(cmd, "/cpr", true) == 0)
  {
  if(IsPlayerConnected(playerid))
  {
    if(P_DATA[playerid][pHelper] >= 1 || P_DATA[playerid][pAdmin] >= 1)
    {
      GetPlayerName(playerid, sendername, sizeof(sendername));
      tmp = strtok(cmdtext, idx);
      if(!strlen(tmp))
      {
        SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF}: /cpr [playerid/PartOfName]");
        return 1;
      }
      new idplayer;
      idplayer = ReturnUser(tmp);
      new numeplayer[182];
      GetPlayerName(idplayer, numeplayer, sizeof(numeplayer));
      if(IsPlayerConnected(idplayer))
      {
        if(idplayer != INVALID_PLAYER_ID)
        {
          if (idplayer == playerid)
          {
            SendClientMessage(playerid, COLOR_WHITE, "Nu iti poti da /closereport singur.");
            return 1;
          }
          if(GetPVarInt(idplayer, "LiveChat") == 1)
          {
            format(string,sizeof(string),"** Administratorul{0066FF} %s {FFFFFF}a inchis reportul. O zi placuta !", sendername);
            SendClientMessage(idplayer,COLOR_WHITE,string);
            SendClientMessage(playerid,COLOR_WHITE,"[REPORT]: Reportul a fost inchis!");
            SetPVarInt(playerid,"LiveChat",0);
            SetPVarInt(idplayer,"LiveChat",0);
            DeletePVar(playerid,"RJucator");
            DeletePVar(idplayer,"RJucator");
            ABroadCast(COLOR_YELLOW, string,1);
            CallReport[idplayer] = 0;
          }
          else
          {
            SendClientMessage(playerid, COLOR_GRAD1, "[Anti-Abuz] Acel player nu are un report deschis!");
          }
        }
      }
      else
      {
        SendClientMessage(playerid, COLOR_GRAD1, "Acel jucator nu este conectat.");
      }
    }
  }
  return 1;
}
   	if(strcmp(cmd, "/stergereport", true) == 0 || strcmp(cmd, "/spr", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(P_DATA[playerid][pAdmin] >= 7)
	        {
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			new numeplayer[182];
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[256];
			new pID;
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			if(GetPVarInt(playerid,"LiveChat") != 1) return SendClientMessage(playerid,COLOR_WHITE,"[REPORT]: Nu va aflati in live chat!");
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GRAD1, "{00FF00}Folosire:{FFFFFF} /stergereport [ID REPORT]");
				return 1;
			}
	        format(string,sizeof(string),"** Administratorul{0066FF} %s {FFFFFF}a sters reportul dvs. O zi placuta !", sendername, numeplayer);
	        SendClientMessage(pID,COLOR_WHITE,string);
            SendClientMessage(playerid,COLOR_WHITE,"[REPORT]: Reportul a fost sters!");
	        DeletePVar(pID,"Report");
             }
    	}
		return 1;
	}
	if(strcmp(cmd, "/rc", true) == 0)
	{
	if(P_DATA[playerid][pHelper] >= 1 || P_DATA[playerid][pAdmin] >= 1) return SendClientMessage(playerid,COLOR_WHITE,"[REPORT]: Doar playerii pot folosi /rc!");
	    if(IsPlayerConnected(playerid))
	    {
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[256];
			new string1[128];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			if(GetPVarInt(playerid,"LiveChat") != 1) return SendClientMessage(playerid,COLOR_WHITE,"[REPORT]: Nu va aflati in live chat!");
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GRAD1, "{00FF00}Folosire:{FFFFFF} /rc [text]");
				return 1;
			}
			format(string,sizeof(string),"{3399FF}[Jucator]: %s: %s", sendername, result);
			SendClientMessage(GetPVarInt(playerid,"RJucator"),COLOR_WHITE,string);
			format(string1,sizeof(string1),"{3399FF}[Jucator]: %s: %s", sendername, result);
			SendClientMessage(playerid,COLOR_WHITE,string1);
		}
		return 1;
	}
    if(strcmp(cmd, "/ra", true) == 0)
	{
	if(P_DATA[playerid][pAdmin] < 1) return SendClientMessage(playerid,COLOR_WHITE,"[REPORT]: Doar adminii pot folosi /ra!");
	    if(IsPlayerConnected(playerid))
	    {
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[256];
			new string1[128];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			if(GetPVarInt(playerid,"LiveChat") != 1) return SendClientMessage(playerid,COLOR_WHITE,"[REPORT]: Nu va aflati in live chat!");
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GRAD1, "{00FF00}Folosire:{FFFFFF} /ra [text]");
				return 1;
			}
			format(string,sizeof(string),"{3399FF}[Administrator]: {2288bb}%s: {FFFFFF}%s", sendername, result);
			SendClientMessage(GetPVarInt(playerid,"RJucator"),COLOR_WHITE,string);
			format(string1,sizeof(string1),"{3399FF}[Administrator]: {2288bb}%s: {FFFFFF}%s", sendername, result);
			SendClientMessage(playerid,COLOR_WHITE,string1);
		}
		return 1;
	}

    if(strcmp(cmd, "/reporthelp", true) == 0)
    {
	if (P_DATA[playerid][pAdmin] >= 1 || P_DATA[playerid][pHelper] >= 1)
	{
	    SendClientMessage(playerid,COLOR_WHITE,"|_________{0066FF}Report Help:{FFFFFF}_________|");
	    SendClientMessage(playerid,COLOR_WHITE,"{0066FF}Report Help:{FFFFFF} /ra - Vorbesti in live chat");
	    SendClientMessage(playerid,COLOR_WHITE,"{0066FF}Report Help:{FFFFFF} /closereport - Inchide report");
	    SendClientMessage(playerid,COLOR_WHITE,"{0066FF}Report Help:{FFFFFF} /openreport - Deschide report / live chat");
	    SendClientMessage(playerid,COLOR_WHITE,"{0066FF}Report Help:{FFFFFF} /stergereport - Stergi un report");
	    SendClientMessage(playerid,COLOR_WHITE,"{0066FF}Report Help:{FFFFFF} /reports - Lista reporturi");
	    return 1;
	    }
    }
    if(strcmp(cmd, "/reports", true) == 0)
{
   if(P_DATA[playerid][pAdmin] >= 1 || P_DATA[playerid][pHelper] >= 1)
   {
      if(IsPlayerConnected(playerid))
      {
          for(new i = 0; i < MAX_PLAYERS; i++)
          {
              if(GetPVarInt(i,"Report") == 1 && IsPlayerConnected(i))
              {
                  SendClientMessage(playerid,COLOR_WHITE,"|_________{0066FF}Report List:{FFFFFF}_________|");
                  format(string,sizeof(string),"[DESCHIS] Nume: %s | ID: %i",PlayerName(i), i);
                  SendClientMessage(playerid,COLOR_WHITE,string);
              }
          }
       }
    }
    return 1;
}
                                         
//Dialoguri Report.
	//Dialog System Report
       if(dialogid == DIALOG_REPORT)
	{
	    if(response == 1)
	    {
		    if(listitem == 0)
		    {
		        ShowPlayerDialog(playerid,DIALOG_REPORTJUCATOR,DIALOG_STYLE_INPUT,"{0066FF}Raporteaza {FFFFFF}un {0066FF}jucator:","Spuneti-ne cateva detalii despre jucator si numele acestuia.","Select","Cancel");
		        return 1;
		    }
		    if(listitem == 1)
		    {
		        ShowPlayerDialog(playerid,DIALOG_AJUTOR,DIALOG_STYLE_INPUT,"{0066FF}Ajutor {FFFFFF}/ {0066FF}probleme:","Ce problema aveti?","Select","Cancel");
		        return 1;
		    }
		    if(listitem == 2)
		    {
		        ShowPlayerDialog(playerid,DIALOG_BUG,DIALOG_STYLE_INPUT,"{0066FF}Raporteaza {FFFFFF}un BUG:","Despre ce bug este vorba?","Select","Cancel");
		        return 1;
		    }
		    if(listitem == 3)
		    {
		        ShowPlayerDialog(playerid,DIALOG_BLOCAT,DIALOG_STYLE_INPUT,"{0066FF}Probleme {FFFFFF}tehnice:","M-am blocat!","Trimite","Cancel");
		        return 1;
		    }
		    if(listitem == 4)
		    {
		        ShowPlayerDialog(playerid,DIALOG_VAD,DIALOG_STYLE_INPUT,"{0066FF}Probleme {FFFFFF}tehnice:","Nu vad nimic!","Trimite","Cancel");
		        return 1;
		    }
		    if(listitem == 5)
		    {
		        ShowPlayerDialog(playerid,DIALOG_PIERDUT,DIALOG_STYLE_INPUT,"{0066FF}Probleme {FFFFFF}tehnice:","Scrie mai jos TOT MESAJUl in functie de problema ta.","Trimite","Cancel");
		        return 1;
		    }
		    if(listitem == 6)
		    {
		        ShowPlayerDialog(playerid,DIALOG_ALTA,DIALOG_STYLE_INPUT,"{0066FF}Alte {FFFFFF}probleme!:","Scrie mai jos TOT MESAJUl in functie de problema.","Trimite","Cancel");
		        return 1;
		    }
 		}
 		if(response == 0)
 		{
 		    ShowPlayerDialog(playerid,DIALOG_INAPOI,DIALOG_STYLE_MSGBOX,"{0066FF}AfterSchool RPG {FFFFFF}REPORTS - Inchidere","Esti sigur ca vrei sa inchizi reportul?","Da","Inapoi");
 		    return 1;
 		}
	}
	//========Next Function==================//
     if(dialogid == DIALOG_REPORTJUCATOR)
	{
	    if(response == 1)
	    {
            new string[128];
			SendClientMessage(playerid,COLOR_WHITE,"SERVER: Jucatorul a fost raportat , iar in scurt timp un administrator se va ocupa de acesta.");
			format(string, sizeof(string), "[REPORT]: {7a0f27}%s{FFFFFF} a raportat un jucator! : {7a0f27}({FFFFFF} %s {7a0f27})",PlayerName(playerid),inputtext);
			RBroadCast(COLOR_LIGHTBLUE,string,1);
			SetPVarInt(playerid,"Report",1);
		}
		if(response == 0)
		{
		    ShowPlayerDialog(playerid,DIALOG_INAPOI,DIALOG_STYLE_MSGBOX,"{0066FF}AfterSchool RPG {FFFFFF}REPORTS - Inchidere","Esti sigur ca vrei sa inchizi reportul?","Da","Inapoi");
		}
	}
	if(dialogid == DIALOG_AJUTOR)
	{
	    if(response == 1)
	    {
            new string[128];
			SendClientMessage(playerid,COLOR_WHITE,"SERVER: Problema dvs. a fost trimisa catre un administrator.");
			format(string, sizeof(string), "[REPORT]: {7a0f27}%s{FFFFFF} are o problema! : {7a0f27}({FFFFFF} %s {7a0f27})",PlayerName(playerid),inputtext);
			RBroadCast(COLOR_LIGHTBLUE,string,1);
			SetPVarInt(playerid,"Report",1);
		}
		if(response == 0)
		{
		    ShowPlayerDialog(playerid,DIALOG_INAPOI,DIALOG_STYLE_MSGBOX,"{0066FF}AfterSchool RPG {FFFFFF}REPORTS - Inchidere","Esti sigur ca vrei sa inchizi reportul?","Da","Inapoi");
		}
	}
	if(dialogid == DIALOG_BUG)
	{
	    if(response == 1)
	    {
            new string[128];
			SendClientMessage(playerid,COLOR_WHITE,"SERVER: BUG-ul gasit de dvs. a fost trimis catre un administrator pentru analizare! Iti multumim!");
			format(string, sizeof(string), "[REPORT]: {7a0f27}%s{FFFFFF} a gasit un bug! : {7a0f27}({FFFFFF} %s {7a0f27})",PlayerName(playerid),inputtext);
			RBroadCast(COLOR_LIGHTBLUE,string,1);
			SetPVarInt(playerid,"Report",1);
		}
		if(response == 0)
		{
		    ShowPlayerDialog(playerid,DIALOG_INAPOI,DIALOG_STYLE_MSGBOX,"{0066FF}AfterSchool RPG {FFFFFF}REPORTS - Inchidere","Esti sigur ca vrei sa inchizi reportul?","Da","Inapoi");
		}
	}
	if(dialogid == DIALOG_BLOCAT)
	{
	    if(response == 1)
	    {
            new string[128];
			SendClientMessage(playerid,COLOR_WHITE,"SERVER: Reportul M-AM BLOCAT a fost trimis!");
			format(string,sizeof(string),"[REPORT]: {7a0f27}%s{FFFFFF}  s-a blocat!)",PlayerName(playerid),inputtext);
		    RBroadCast(COLOR_LIGHTBLUE,string,1);
			SetPVarInt(playerid,"Report",1);
		}
		if(response == 0)
		{
		    ShowPlayerDialog(playerid,DIALOG_INAPOI,DIALOG_STYLE_MSGBOX,"{0066FF}AfterSchool RPG {FFFFFF}REPORTS - Inchidere","Esti sigur ca vrei sa inchizi reportul?","Da","Inapoi");
		}
	}
	if(dialogid == DIALOG_VAD)
	{
	    if(response == 1)
	    {
            new string[128];
			SendClientMessage(playerid,COLOR_WHITE,"SERVER: Reportul NU VAD NIMIC a fost trimis!");
			format(string,sizeof(string),"[REPORT]: {7a0f27}%s{FFFFFF} nu vede nimic!)",PlayerName(playerid),inputtext);
			RBroadCast(COLOR_LIGHTBLUE,string,1);
			SetPVarInt(playerid,"Report",1);
		}
		if(response == 0)
		{
		    ShowPlayerDialog(playerid,DIALOG_INAPOI,DIALOG_STYLE_MSGBOX,"{0066FF}AfterSchool RPG {FFFFFF}REPORTS - Inchidere","Esti sigur ca vrei sa inchizi reportul?","Da","Inapoi");
		}
	}
	if(dialogid == DIALOG_PIERDUT)
	{
	    if(response == 1)
	    {
            new string[128];
			SendClientMessage(playerid,COLOR_WHITE,"SERVER: Reportul dumneavostra a fost trimis!");
			format(string,sizeof(string),"[REPORT]: {7a0f27}%s{FFFFFF} a pierdut un bun personal! : {7a0f27}({FFFFFF} %s {7a0f27})",PlayerName(playerid),inputtext);
			RBroadCast(COLOR_LIGHTBLUE,string,1);
			SetPVarInt(playerid,"Report",1);
		}
		if(response == 0)
		{
		    ShowPlayerDialog(playerid,DIALOG_INAPOI,DIALOG_STYLE_MSGBOX,"{0066FF}AfterSchool RPG {FFFFFF}REPORTS - Inchidere","Esti sigur ca vrei sa inchizi reportul?","Da","Inapoi");
		}
	}
	if(dialogid == DIALOG_ALTA)
	{
	    if(response == 1)
	    {
            new string[128];
			SendClientMessage(playerid,COLOR_WHITE,"SERVER: Reportul dumneavostra a fost trimis!");
			format(string,sizeof(string),"[REPORT]: {7a0f27}%s{FFFFFF} are o problema! : {7a0f27}({FFFFFF} %s {7a0f27})",PlayerName(playerid),inputtext);
			RBroadCast(COLOR_LIGHTBLUE,string,1);
			SetPVarInt(playerid,"Report",1);
		}
		if(response == 0)
		{
		    ShowPlayerDialog(playerid,DIALOG_INAPOI,DIALOG_STYLE_MSGBOX,"{0066FF}AfterSchool RPG {FFFFFF}REPORTS - Inchidere","Esti sigur ca vrei sa inchizi reportul?","Da","Inapoi");
		}
	}
	if(dialogid == DIALOG_INAPOI)
	{
	    if(response == 0)
	    {
			ShowPlayerDialog(playerid,DIALOG_REPORT,DIALOG_STYLE_LIST,"{0066FF}AfterSchool RPG {FFFFFF}REPORTS","{0066FF}1.{FFFFFF}Raporteaza un jucator.\n{0066FF}2.{FFFFFF}Ajutor / Probleme.\n{0066FF}3.{FFFFFF}Raporteaza un BUG.\n{0066FF}4.{FFFFFF}M-am blocat.\n{0066FF}5.{FFFFFF}Nu vad nimic.\n{0066FF}6.{FFFFFF}Am pierdut un bun personal.\n{0066FF}7.{FFFFFF}Alte probleme.","Select","Cancel");
	    }
	    return 1;
	}
                                         
 //Functia stock de la care pleaca toate warningurile.
                                         
stock PlayerName( playerid )
{
	new Name[MAX_PLAYER_NAME];
	GetPlayerName( playerid, Name, sizeof( Name ) );
	return Name;
} ===>De la aceasta functie stock pleaca toate warningurile in tot gamemodul ex am testat sistemu de report si cand am apasat pe functia "Alta Problema" Mia aratat ca nu detin un cont pe server dar eu aveam asa ceva si eu am dedus ca toata problema placa de la aceasta functie Am zis sa postez aici tot sa vedeti exact.
                                         
                                         


Imagini / Video (optional):
Ati incercat sa rezolvati singur?:Da am incercat sa modific acea functie stock sa folosesc altceva compatibil adica ce gmul meu cunostea dar nu am reusit tot aceas problema .......Vam lasat cod-ul cu sistemul de report pe dialog.....Sper sa ma puteti ajuta Fara jigniri cum ca nu stii sa scriptezi sau altele eu imi dau silinta Vorba aceea nimeni nu sa nascut stiutor!!

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Cam simplut , ce zici sa dezvoltam nitel?

 

stock PlayerName(playerid)
{
    new Nume[MAX_PLAYER_NAME];

    if(IsPlayerConnected(playerid))
    {
		GetPlayerName(playerid, Nume, sizeof(Nume));
	}
	else
	{
	    Nume = "Player-Deconectat";
	}

	return Nume;
}

 

 

Edited by EquiNox
Culoare

j3V8Znq.png

5IGyOAw.png

Link to comment
Share on other sites

  • 0

Daca iti da eroare modifica stockul din PlayerName in NamedPlayer si gata

Edited by Mister

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0

Din pacate acest warning persista in tot gamemodul din cauza lui nu pot folosi sistemul de report vam mai spus cand apas pe alta problema la dialogul reportului zice ca nam cont e bine eu miam dat seama ca este de la acest warning am facut si solutia lui equinox si tot na mers am incercat si solutia lui Mister si tot na mers:(

Reamintesc Warningul:

warning 219: local variable "PlayerName" shadows a variable at a preceding level

Edited by KingZone
Link to comment
Share on other sites

  • 0
8 minutes ago, KingZone said:

Din pacate acest warning persista in tot gamemodul din cauza lui nu pot folosi sistemul de report vam mai spus cand apas pe alta problema la dialogul reportului zice ca nam cont e bine eu miam dat seama ca este de la acest warning am facut si solutia lui equinox si tot na mers am incercat si solutia lui Mister si tot na mers:(

Reamintesc Warningul:

warning 219: local variable "PlayerName" shadows a variable at a preceding level

1.În primul rând, este mult mai bine dacă enumeri dialogurile în loc să le defineați, de ce? Pai la un moment dat se pot încurca.

Ex:

În loc de

#define DIALOG_XXX 123

Pui:

enum

{

DIALOG_XXX

};

2.In al doilea rând, la problema cu stock.ul, try this:

stock PlayerNamexx( playerid ) { new Namex[MAX_PLAYER_NAME]; GetPlayerName( playerid, Namex, sizeof( Namex ) ); return Namex; }

Iar unde ai PlayerName schimbi cu PlayerNamexx

3.Ar fi mai bine să treci comenzile pe zcmd.

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.