Jump to content

Question

Posted

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??

16 answers to this question

Recommended Posts

  • 0
Posted
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);}}

  • 0
Posted

Easy, Te duci la linia respectiva si definesti "i" ala in metoda asta, foreach(Player, i) { si pui la sfarsit dupa ce sa termina "i" alea asta } si gata.

  • 0
Posted

Acum apare 

C:\Users\xBogdanSLL\Desktop\JUCAUSIIGM.pwn(9097) : error 033: array must be indexed (variable "PlayerInfo")
C:\Users\xBogdanSLL\Desktop\JUCAUSIIGM.pwn(9112) : error 032: array index out of bounds (variable "PlayerInfo")

  • 0
Posted

Ai gresit in TDEditor cand ai pus. Oricum, daca e copiat cel mai probabil nu este compatibil. Nu o sa-ti mai zic unde ai gresit deoarece ti-au spus ceilalti.

 

  • 0
Posted (edited)
2 minutes ago, Bogdan1 said:

Nu mai bine imi rezolvi tu si imi dai comanda te rog?

Trebuie sa definesti "i" ala prin foreach(Player, i)

 

Edited by [i]Stefan
  • 0
Posted
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:

 

 

  • 0
Posted (edited)
2 minutes ago, Bogdan1 said:

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

Acum apare iar aia cu PlayerInfo.

pune asta; https://pastebin.com/k0qnaGvf

 

Edited by [i]Stefan
  • 0
Posted
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.

 

  • 0
Posted
Just now, @SanJay said:

 

Aveti PM, nu free-chat aici.

E ajutor scripting, Deci are tot dreptul să mă ajute.

  • 0
Posted
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

  • 0
Posted (edited)

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
  • 0
Posted
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ă..

  • 0
Posted (edited)
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.