Errori

Započeo Martyn, Jun 12, 2020, 03:27:33 PRE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Problem(error/warning): Baca warninge na case D_KREIRAJLABEL: , ostavicu vam ovaj i jos jedan kejs iznad njega
Dio skripte: [pawn]              case 3: //Svi TD-ovi
              {
                  if(LijeciOvisnostVrijeme[playerid] == 1 || BolnicaSpawn[playerid] == true) return Greska(playerid, "Ne mozete to dok ste u bolnici!");
                if(GledaKatalog[playerid] != -1) return Greska(playerid, "Prvo zatvorite Tablet!");
                if(ListaFelne[playerid] == 1) return Greska(playerid, "Prvo morate ugasiti nadogradnju felni 'ESC'!");
                if(PosaoTD[playerid] == true) return Greska(playerid, "Morate prvo ugasiti ugovor o zaposljavanju!");
                if(DrogiraSe[playerid] == true) return Greska(playerid, "Ne mozete to dok se drogirate, sacekajte...");
                if(Ima_Kockica_TD[playerid] != 0) return Greska(playerid, "Prvo morate zatvoriti kockica TextDraw!");
                if(Ima_IksOks_TD[playerid] != 0) return Greska(playerid, "Prvo morate zatvoriti IksOks TextDraw!");
                if(Koristi_Zavoj[playerid] != -1) return Greska(playerid, "Sacekajte dok zamotate zavoj!");
                if(Ima_Vozilo_TD[playerid] != 0) return Greska(playerid, "Morate prvo ugasiti Textdraw za listu vozila!");
                if(Ima_Stats_TD[playerid] != 0) return Greska(playerid, "Morate prvo ugasiti Textdraw za Player Menu (/stats)!");
                if(Ima_PayDay_TD[playerid] != 0) return Greska(playerid, "Morate prvo ugasiti Textdraw za PayDay!");
                if(Ima_Hack_TD[playerid] != 0) return Greska(playerid, "Ne mozete to dok hakujete!");
                   if(TDAll[playerid] == 0)
                   {
                       IG_Info2(playerid, "Iskljucili ste sve TD-ove.");
                       TDAll[playerid] = 1;
                       Update_InfoTD[playerid] = 0;
                        if(ServerInfo[sHappyJob] != -1) UnistiHJTD(playerid);
                   #if ZIMSKI_UPDATE == 1
                  PlayerTextDrawHide(playerid, Kapa_PTD[playerid]);
                  Kapa_PTD_Prikazana[playerid] = false;
                  #endif
                   }
                  // -----------------------------------------------------
                       TDGornji[playerid] = 0; TDSporuke[playerid] = 0; TDAll[playerid] = 0;
                       Update_InfoTD[playerid] = 1;
                        UpdatePlayerInfoTD(playerid);
                  new datum[15], vrijeme[10], n_string[MAX_PLAYER_NAME+1], sat, minut, sekund, dan, mjesec, godina;
                  gettime(sat, minut, sekund); getdate(godina, mjesec, dan);
                  format(vrijeme, sizeof datum, "%02d:%02d", sat, minut);
                  PlayerTextDrawSetString(playerid, Uigri_PTD[playerid][14], vrijeme);
                  format(datum, sizeof datum, "%02d.%02d.%02d.", dan, mjesec, godina);
                  PlayerTextDrawSetString(playerid, Uigri_PTD[playerid][15], datum);
                  format(n_string, sizeof n_string, "%s", GetName(playerid));
                  PlayerTextDrawSetString(playerid, Uigri_PTD[playerid][27], n_string);
                       IG_Info(playerid, "Ukljucili ste sve TD-ove.");
                       if(ServerInfo[sHappyJob] != -1) PodesiHJTD(playerid);
                   #if ZIMSKI_UPDATE == 1
                  PlayerTextDrawShow(playerid, Kapa_PTD[playerid]);
                  Kapa_PTD_Prikazana[playerid] = true;
                  #endif
                   }
                }
             }
      }
      case D_KREIRAJLABEL:
      {
          if(!response) return 1;
          if(response)
          {
              if(strlen(inputtext) > 0)
              {
                new l_id = 0;
                new string[256];
               GetPlayerPos(playerid, X_C, Y_C, Z_C);
               for(new b = 0; b < sizeof(LabelInfo); b++)
               {
                  if(LabelInfo[lPostavljen] == 1)
                  {
                     l_id = b + 1;
                  }
               }
               if(l_id > MAX_LABELA) return Greska(playerid, "Ne mozete kreirati vise od maximalnog broja labela.");
               LabelInfo[l_id][lPozX] = X_C;
               LabelInfo[l_id][lPozY] = Y_C;
               LabelInfo[l_id][lPozZ] = Z_C;
                LabelInfo[l_id][lPostavljen] = 1;
                format(string, sizeof(string), "%s", inputtext);
                strmid(LabelInfo[l_id][lText], string, 0, strlen(string), 255);
               if(LabelVrsta[playerid] == 1)
               {
                   lLabel[l_id] = CD3DTL(string, -1, LabelInfo[l_id][lPozX], LabelInfo[l_id][lPozY], LabelInfo[l_id][lPozZ], 20);
                  LabelInfo[l_id][lVrsta] = 1;
                  LabelVrsta[playerid] = 0;
               }
               if(LabelVrsta[playerid] == 2)
               {
                  lLabel[l_id] = CD3DTL(string, -1, LabelInfo[l_id][lPozX], LabelInfo[l_id][lPozY], LabelInfo[l_id][lPozZ], 5);
                  lPickup[l_id] = CDP(1239, 1, LabelInfo[l_id][lPozX], LabelInfo[l_id][lPozY], LabelInfo[l_id][lPozZ]);
                  LabelInfo[l_id][lVrsta] = 2;
                  LabelVrsta[playerid] = 0;
               }
               if(LabelVrsta[playerid] == 3)
               {
                  lLabel[l_id] = CD3DTL(string, -1, LabelInfo[l_id][lPozX], LabelInfo[l_id][lPozY], LabelInfo[l_id][lPozZ], 10);
                  lPickup[l_id] = CDP(19132, 1, LabelInfo[l_id][lPozX], LabelInfo[l_id][lPozY], LabelInfo[l_id][lPozZ]);
                  LabelInfo[l_id][lVrsta] = 3;
                  LabelVrsta[playerid] = 0;
               }
               SacuvajLabel(l_id);
               format(string, sizeof(string), ""AINFOZUTA"(OWNER-INFO): "BIJELA"Admin %s je kreirao Label ID: %d.", GetName(playerid), l_id);
               OwnerPoruka(-1, string);
               format(string, sizeof(string), "KREIRAJLABEL | Staff: %s | LABEL ID: %d | IME: %s", l_id, inputtext);
               UpisiLog(LOG_KREIRANJE, string);
            }
         }
      }[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
D:\Gamemode skripte 2\JUZNI VETAR BY JOEY\gamemodes\IG.pwn(42508) : error 014: invalid statement; not in switch
D:\Gamemode skripte 2\JUZNI VETAR BY JOEY\gamemodes\IG.pwn(42508) : warning 215: expression has no effect
D:\Gamemode skripte 2\JUZNI VETAR BY JOEY\gamemodes\IG.pwn(42508) : error 001: expected token: ";", but found ":"
D:\Gamemode skripte 2\JUZNI VETAR BY JOEY\gamemodes\IG.pwn(42508) : error 029: invalid expression, assumed zero
D:\Gamemode skripte 2\JUZNI VETAR BY JOEY\gamemodes\IG.pwn(42508) : fatal error 107: too many error messages on one line

Slika/video ingame problema(obavezno ako je ingame problem):

Da nisi zagradu dje omasio ?

Citat: //>> Vedran poslato Jun 12, 2020, 03:28:49 PRE PODNE
Da nisi zagradu dje omasio ?
Resio sam problem, na proslom caseu je trebalo da se ovo izravna ovako : TDGornji[playerid] = 0; TDSporuke[playerid] = 0; TDAll[playerid] = 0;
                   Update_InfoTD[playerid] = 1;
                    UpdatePlayerInfoTD(playerid);
               new datum[15], vrijeme[10], n_string[MAX_PLAYER_NAME+1], sat, minut, sekund, dan, mjesec, godina;
               gettime(sat, minut, sekund); getdate(godina, mjesec, dan);
               format(vrijeme, sizeof datum, "%02d:%02d", sat, minut);
               PlayerTextDrawSetString(playerid, Uigri_PTD[playerid][14], vrijeme);
               format(datum, sizeof datum, "%02d.%02d.%02d.", dan, mjesec, godina);
               PlayerTextDrawSetString(playerid, Uigri_PTD[playerid][15], datum);
               format(n_string, sizeof n_string, "%s", GetName(playerid));
               PlayerTextDrawSetString(playerid, Uigri_PTD[playerid][27], n_string);
                IG_Info(playerid, "Ukljucili ste sve TD-ove.");
                   if(ServerInfo[sHappyJob] != -1) PodesiHJTD(playerid);
                #if ZIMSKI_UPDATE == 1
               PlayerTextDrawShow(playerid, Kapa_PTD[playerid]);
               Kapa_PTD_Prikazana[playerid] = true;

Citat: Martyn poslato Jun 12, 2020, 04:34:23 PRE PODNE
Resio sam problem, na proslom caseu je trebalo da se ovo izravna ovako : [pawn]                TDGornji[playerid] = 0; TDSporuke[playerid] = 0; TDAll[playerid] = 0;
                   Update_InfoTD[playerid] = 1;
                    UpdatePlayerInfoTD(playerid);
               new datum[15], vrijeme[10], n_string[MAX_PLAYER_NAME+1], sat, minut, sekund, dan, mjesec, godina;
               gettime(sat, minut, sekund); getdate(godina, mjesec, dan);
               format(vrijeme, sizeof datum, "%02d:%02d", sat, minut);
               PlayerTextDrawSetString(playerid, Uigri_PTD[playerid][14], vrijeme);
               format(datum, sizeof datum, "%02d.%02d.%02d.", dan, mjesec, godina);
               PlayerTextDrawSetString(playerid, Uigri_PTD[playerid][15], datum);
               format(n_string, sizeof n_string, "%s", GetName(playerid));
               PlayerTextDrawSetString(playerid, Uigri_PTD[playerid][27], n_string);
                IG_Info(playerid, "Ukljucili ste sve TD-ove.");
                   if(ServerInfo[sHappyJob] != -1) PodesiHJTD(playerid);
                #if ZIMSKI_UPDATE == 1
               PlayerTextDrawShow(playerid, Kapa_PTD[playerid]);
               Kapa_PTD_Prikazana[playerid] = true;[/pawn]