Jump to content
  • 0

Problemă AdminBar


Bogdan1

Question

Salut, am şi eu o problemă am incercat sa adaug AdminBar dar imi da eroarea de mai jos..

 

C:\Users\xBogdanSLL\Desktop\JUCAUSIIGM.pwn(9112) : error 017: undefined symbol "i"

 

Spoiler

 if(PlayerInfo[pAdmin] >= 5)
     {
          new reports=0,cheaters=0;
          foreach(new id : Player)
          {
               if(strcmp(reporttext[id], "NULL", true) && reportcheater[id] == -1)
               {
                    reports++;
                    }
                         if(reportcheater[id] != -1)
                         {
                              cheaters++;
                         }
                    }
                    TextDrawShowForPlayer(i, AdminHUD);
                    format(string, sizeof(string), "Tick: ~b~%d~w~ / Reports: ~r~%d~w~ / Cheaters: ~r~%d~w~ / FPS: ~g~%d~w~ / Ping: ~r~%d~w~ / Anim: ~y~%d~w~", GetServerTickRate(), reports, cheaters, PlayerInfo[pFPS], GetPlayerPing(i), GetPlayerAnimationIndex(i));
                    TextDrawSetString(AdminHUD, string);
               }

Cum pot rezolva??

Link to comment
Share on other sites

16 answers to this question

Recommended Posts

  • 0
Acum 1 minut, Bogdan1 a spus:

Salut, am şi eu o problemă am incercat sa adaug AdminBar dar imi da eroarea de mai jos..

 

C:\Users\xBogdanSLL\Desktop\JUCAUSIIGM.pwn(9112) : error 017: undefined symbol "i"

 

  Ascunde conținuturi

 if(PlayerInfo[pAdmin] >= 5)
     {
          new reports=0,cheaters=0;
          foreach(new id : Player)
          {
               if(strcmp(reporttext[id], "NULL", true) && reportcheater[id] == -1)
               {
                    reports++;
                    }
                         if(reportcheater[id] != -1)
                         {
                              cheaters++;
                         }
                    }
                    TextDrawShowForPlayer(i, AdminHUD);
                    format(string, sizeof(string), "Tick: ~b~%d~w~ / Reports: ~r~%d~w~ / Cheaters: ~r~%d~w~ / FPS: ~g~%d~w~ / Ping: ~r~%d~w~ / Anim: ~y~%d~w~", GetServerTickRate(), reports, cheaters, PlayerInfo[pFPS], GetPlayerPing(i), GetPlayerAnimationIndex(i));
                    TextDrawSetString(AdminHUD, string);
               }

Cum pot rezolva??

 if(PlayerInfo[pAdmin] >= 5)
     {
          new reports=0,cheaters=0;
          foreach(new id : Player)
          {
               if(strcmp(reporttext[id], "NULL", true) && reportcheater[id] == -1)
               {
                    reports++;
                    }
                         if(reportcheater[id] != -1)
                         {
                              cheaters++;
                         }
                    
                    TextDrawShowForPlayer(id, AdminHUD);
                    format(string, sizeof(string), "Tick: ~b~%d~w~ / Reports: ~r~%d~w~ / Cheaters: ~r~%d~w~ / FPS: ~g~%d~w~ / Ping: ~r~%d~w~ / Anim: ~y~%d~w~", GetServerTickRate(), reports, cheaters, PlayerInfo[pFPS], GetPlayerPing(id), GetPlayerAnimationIndex(id));
                    TextDrawSetString(AdminHUD, string);}}

Link to comment
Share on other sites

  • 0
2 minutes ago, Stefan said:

 if(PlayerInfo[pAdmin] >= 5)
     {
          new reports=0,cheaters=0;
          foreach(new id : Player)
          {
               if(strcmp(reporttext[id], "NULL", true) && reportcheater[id] == -1)
               {
                    reports++;
                    }
                         if(reportcheater[id] != -1)
                         {
                              cheaters++;
                         }
                    
                    TextDrawShowForPlayer(id, AdminHUD);
                    format(string, sizeof(string), "Tick: ~b~%d~w~ / Reports: ~r~%d~w~ / Cheaters: ~r~%d~w~ / FPS: ~g~%d~w~ / Ping: ~r~%d~w~ / Anim: ~y~%d~w~", GetServerTickRate(), reports, cheaters, PlayerInfo[pFPS], GetPlayerPing(id), GetPlayerAnimationIndex(id));
                    TextDrawSetString(AdminHUD, string);}}

//incearca asa si daca da eroare cu "i" ala pui asa

foreach(Player ,i) {

 if(PlayerInfo[pAdmin] >= 5)
     {
          new reports=0,cheaters=0;
          foreach(new id : Player)
          {
               if(strcmp(reporttext[id], "NULL", true) && reportcheater[id] == -1)
               {
                    reports++;
                    }
                         if(reportcheater[id] != -1)
                         {
                              cheaters++;
                         }
                    
                    TextDrawShowForPlayer(id, AdminHUD);
                    format(string, sizeof(string), "Tick: ~b~%d~w~ / Reports: ~r~%d~w~ / Cheaters: ~r~%d~w~ / FPS: ~g~%d~w~ / Ping: ~r~%d~w~ / Anim: ~y~%d~w~", GetServerTickRate(), reports, cheaters, PlayerInfo[pFPS], GetPlayerPing(id), GetPlayerAnimationIndex(id));
                    TextDrawSetString(AdminHUD, string);}}

C:\Users\xBogdanSLL\Desktop\JUCAUSIIGM.pwn(9097) : error 033: array must be indexed (variable "PlayerInfo")

Acum apare iar aia cu PlayerInfo.

2 minutes ago, Stefan said:

 

 

Link to comment
Share on other sites

  • 0
Chiar acum, Stefan a spus:

 

 

Chiar acum, Bogdan1 a spus:

C:\Users\xBogdanSLL\Desktop\JUCAUSIIGM.pwn(9097) : error 033: array must be indexed (variable "PlayerInfo")

Acum apare iar aia cu PlayerInfo.

 

Aveti PM, nu free-chat aici.

 

Link to comment
Share on other sites

  • 0
5 minutes ago, Stefan said:

 

C:\Users\xBogdanSLL\Desktop\JUCAUSIIGM.pwn(9097) : error 017: undefined symbol "i"
C:\Users\xBogdanSLL\Desktop\JUCAUSIIGM.pwn(9112) : error 032: array index out of bounds (variable "PlayerInfo")

Tot Nu merge

2 minutes ago, valivaly96 said:

Vanuiesc ca codul care e postat face parte dintr un timer. in ce variabila stochezi id ul jucatorului?

 Nu este pe timer

Folosesc if(Playerid

Link to comment
Share on other sites

  • 0

Nu e definit "i", Stiu ca intr-un tutorial de al lui edison, in chestia aia cu PayDay TD, il definea. Poti sa te uiti acolo daca ai Gamemode Bigzone :))

ma rog, daca iti e sila sa te uiti: foreach(i, playerid);

Si chestia cu PlayerInfo e ca nu e definit PlayerInfo la tine in gamemode, asta e clar :lol:, tot ce trebuie sa faci e sa il definiesti sau sa il modifci :))

Edited by AndreiAdv
Link to comment
Share on other sites

  • 0
1 minute ago, AndreiAdv said:

Nu e definit "i", Stiu ca intr-un tutorial de al lui edison, in chestia aia cu PayDay TD, il definea. Poti sa te uiti acolo daca ai Gamemode Bigzone :))

ma rog, daca iti e sila sa te uiti: foreach(i, playerid);

Si chestia cu PlayerInfo e ca nu e definit PlayerInfo la tine in gamemode, asta e clar :lol:, tot ce trebuie sa faci e sa il definiesti sau sa il modifci :))

Mersi, dar nu mai am nevoie. O las deoparte nu mai am chef sa ma chinui la o chestie simplă..

Link to comment
Share on other sites

  • 0
16 hours ago, Bogdan1 said:

Salut, am şi eu o problemă am incercat sa adaug AdminBar dar imi da eroarea de mai jos..

 

C:\Users\xBogdanSLL\Desktop\JUCAUSIIGM.pwn(9112) : error 017: undefined symbol "i"

 

  Reveal hidden contents

 if(PlayerInfo[pAdmin] >= 5)
     {
          new reports=0,cheaters=0;
          foreach(new id : Player)
          {
               if(strcmp(reporttext[id], "NULL", true) && reportcheater[id] == -1)
               {
                    reports++;
                    }
                         if(reportcheater[id] != -1)
                         {
                              cheaters++;
                         }
                    }
                    TextDrawShowForPlayer(i, AdminHUD);
                    format(string, sizeof(string), "Tick: ~b~%d~w~ / Reports: ~r~%d~w~ / Cheaters: ~r~%d~w~ / FPS: ~g~%d~w~ / Ping: ~r~%d~w~ / Anim: ~y~%d~w~", GetServerTickRate(), reports, cheaters, PlayerInfo[pFPS], GetPlayerPing(i), GetPlayerAnimationIndex(i));
                    TextDrawSetString(AdminHUD, string);
               }

Cum pot rezolva??

la mine arata ceva de genul 

doar ca asta este pusa la un timer OnPlayerUnjail si e facut foreach-ul inainte

if(PlayerInfo[pAdmin] >= 5)
            {
                new reports=0,cheaters=0;
                foreach(new id : Player)
                {
                    if(strcmp(reporttext[id], "NULL", true) && reportcheater[id] == -1)
                    {
                        reports++;
                    }
                    if(reportcheater[id] != -1)
                    {
                        cheaters++;
                    }
                }
                TextDrawShowForPlayer(i, AdminHUD);
                format(string, sizeof(string), "FPS: ~g~%d~w~ / Ping: ~r~%d~w~ / Tick: ~b~%d~w~ / Reports: ~r~%d~w~ / Cheaters: ~r~%d~w~ / Anim: ~y~%d~w~", PlayerInfo[pFPS], GetPlayerPing(i), GetServerTickRate(), reports, cheaters, GetPlayerAnimationIndex(i));
                TextDrawSetString(AdminHUD, string);
            }

si acolo la verificarea playerinfo[padmin] > 5 mai era si un [ i ] dar nu vrea site-ul sa il lase aparent

Edited by Ionut_WS
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.