Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: Shaw Salcedo poslato Februar 07, 2015, 11:32:57 PRE PODNE

Naslov: [Pomoc]Nekakav Tag
Poruka od: Shaw Salcedo poslato Februar 07, 2015, 11:32:57 PRE PODNE
Skripta koju koristim: Bm
Detaljan opis problema: Imam neke error koje nzm fix
C:\Users\Freddy\Desktop\Balkan Matrix RolePlay\gamemodes\FREDDY.pwn(35015) : warning 213: tag mismatch
C:\Users\Freddy\Desktop\Balkan Matrix RolePlay\gamemodes\FREDDY.pwn(35036) : warning 213: tag mismatch
C:\Users\Freddy\Desktop\Balkan Matrix RolePlay\gamemodes\FREDDY.pwn(35036) : warning 213: tag mismatch
C:\Users\Freddy\Desktop\Balkan Matrix RolePlay\gamemodes\FREDDY.pwn(35036) : warning 205: redundant code: constant expression is zero
C:\Users\Freddy\Desktop\Balkan Matrix RolePlay\gamemodes\FREDDY.pwn(35043) : warning 213: tag mismatch
C:\Users\Freddy\Desktop\Balkan Matrix RolePlay\gamemodes\FREDDY.pwn(35044) : warning 213: tag mismatch
C:\Users\Freddy\Desktop\Balkan Matrix RolePlay\gamemodes\FREDDY.pwn(35061) : warning 213: tag mismatch
C:\Users\Freddy\Desktop\Balkan Matrix RolePlay\gamemodes\FREDDY.pwn(35075) : warning 213: tag mismatch
C:\Users\Freddy\Desktop\Balkan Matrix RolePlay\gamemodes\FREDDY.pwn(35075) : warning 213: tag mismatch
C:\Users\Freddy\Desktop\Balkan Matrix RolePlay\gamemodes\FREDDY.pwn(35075) : warning 205: redundant code: constant expression is zero
C:\Users\Freddy\Desktop\Balkan Matrix RolePlay\gamemodes\FREDDY.pwn(35082) : warning 213: tag mismatch
C:\Users\Freddy\Desktop\Balkan Matrix RolePlay\gamemodes\FREDDY.pwn(35083) : warning 213: tag mismatch

if(dialogid == DIALOG_MSTAVITORBA)
{
    if(response)
    {
        if(sscanf(inputtext, "i", materijali))
        {
  format(CmdString, 180, ""CRVENA"Materijali u torbi: "BELA"%d grama\n\n{FFFFFF}Upisite broj grama koji zelite da stavite iz torbe:", PlayerInfo[playerid][zMaterijali]);
    SPD(playerid, DIALOG_MSTAVITORBA, DIALOG_STYLE_INPUT, ""CRVENA"Materijali - Stavi", CmdString, "Stavi", "Nazad");
    return 1;
}
if(PlayerInfo[playerid][pMats] < materijali)
        {
            SendClientMessage(playerid,-1, ""ORANGE"BU:RP: "SIVAc"Nemate toliko materijala u dzepu!");
  format(CmdString, 180, ""CRVENA"Materijali u torbi: "BELA"%d grama\n\n{FFFFFF}Upisite broj grama koji zelite da stavite iz torbe:", PlayerInfo[playerid][zMaterijali]);
    SPD(playerid, DIALOG_MSTAVITORBA, DIALOG_STYLE_INPUT, ""CRVENA"Materijali - Stavi", CmdString, "Stavi", "Nazad");
    return 1;
}
if(PlayerInfo[playerid][zMaterijali] > 4999)
        {
            SendClientMessage(playerid,-1, ""ORANGE"BU:RP: "SIVAc"Nemate mesta vise u torbi! (Max: 4000 grama)");
  format(CmdString, 180, ""CRVENA"Materijali u torbi: "BELA"%d grama\n\n{FFFFFF}Upisite broj grama koji zelite da stavite iz torbe:", PlayerInfo[playerid][zMaterijali]);
    SPD(playerid, DIALOG_MSTAVITORBA, DIALOG_STYLE_INPUT, ""CRVENA"Materijali - Stavi", CmdString, "Stavi", "Nazad");
    return 1;
}
if(!IsNumeric(inputtext))
            {
SendClientMessage(playerid,-1, ""ORANGE"BU:RP: "SIVAc"Nevazeci unos!");
  format(CmdString, 180, ""CRVENA"Materijali u torbi: "BELA"%d grama\n\n{FFFFFF}Upisite broj grama koji zelite da stavite iz torbe:", PlayerInfo[playerid][zMaterijali]);
    SPD(playerid, DIALOG_MSTAVITORBA, DIALOG_STYLE_INPUT, ""CRVENA"Materijali - Stavi", CmdString, "Stavi", "Nazad");
    return 1;
          }
    if(materijali < 1 || materijali > 5000)
{
SendClientMessage(playerid,-1, ""ORANGE"BU:RP: "SIVAc"Nevazeci unos!");
  format(CmdString, 180, ""CRVENA"Materijali u torbi: "BELA"%d grama\n\n{FFFFFF}Upisite broj grama koji zelite da stavite iz torbe:", PlayerInfo[playerid][zMaterijali]);
    SPD(playerid, DIALOG_MSTAVITORBA, DIALOG_STYLE_INPUT, ""CRVENA"Materijali - Stavi", CmdString, "Stavi", "Nazad");
    return 1;
}
PlayerInfo[playerid][pMats] -= materijali;
PlayerInfo[playerid][zMaterijali] += materijali;
SCMF(playerid, -1, ""ORANGE"BU:RP: "BELA"Stavili ste '%d grama' materijala u svoju torbu.", materijali);
print("Test - Materijali/Stavi");
}
      else SPD(playerid, DIALOG_MATSTORBA, DIALOG_STYLE_LIST, ""CRVENA"Materijali u torbi", "Stavi materijale\nUzmi materijale", "Odaberi", "Nazad");
}
//------------------------------------------------------------------------------ // Materijali Uzmi
if(dialogid == DIALOG_MUZMITORBA)
{
    if(response)
    {
        if(sscanf(inputtext, "i", materijali))
        {
  format(CmdString, 180, ""ORANGE"Materijali u torbi: "BELA"%d grama\n\n{FFFFFF}Upisite broj grama koji zelite da uzmete iz torbe:", PlayerInfo[playerid][zMaterijali]);
    SPD(playerid, DIALOG_MUZMITORBA, DIALOG_STYLE_INPUT, ""CRVENA"Materijali - Uzmi", CmdString, "Uzmi", "Nazad");
    return 1;
}
        if(PlayerInfo[playerid][zMaterijali] < materijali)
        {
            SendClientMessage(playerid,-1, ""ORANGE"BU:RP: "SIVAc"Nemate toliko materijala u torbi!");
  format(CmdString, 180, ""CRVENA"Materijali u torbi: "BELA"%d grama\n\n{FFFFFF}Upisite broj grama koji zelite da uzmete iz torbe:", PlayerInfo[playerid][zMaterijali]);
    SPD(playerid, DIALOG_MUZMITORBA, DIALOG_STYLE_INPUT, ""CRVENA"Materijali - Uzmi", CmdString, "Uzmi", "Nazad");
    return 1;
}
if(!IsNumeric(inputtext))
            {
SendClientMessage(playerid,-1, ""ORANGE"BU:RP: "SIVAc"Nevazeci unos!");
  format(CmdString, 180, ""ORANGE"Materijali u torbi: "BELA"%d grama\n\n{FFFFFF}Upisite broj grama koji zelite da uzmete iz torbe:", PlayerInfo[playerid][zMaterijali]);
    SPD(playerid, DIALOG_MUZMITORBA, DIALOG_STYLE_INPUT, ""CRVENA"Materijali - Uzmi", CmdString, "Uzmi", "Nazad");
    return 1;
          }
    if(materijali < 1 || materijali > 1000)
{
SendClientMessage(playerid,-1, ""ORANGE"BU:RP: "SIVAc"Nevazeci unos!");
  format(CmdString, 180, ""CRVENA"Materijali u torbi: "BELA"%d grama\n\n{FFFFFF}Upisite broj grama koji zelite da uzmete iz torbe:", PlayerInfo[playerid][zMaterijali]);
    SPD(playerid, DIALOG_MUZMITORBA, DIALOG_STYLE_INPUT, ""CRVENA"Materijali - Uzmi", CmdString, "Uzmi", "Nazad");
    return 1;
}
PlayerInfo[playerid][pMats] += materijali;
PlayerInfo[playerid][zMaterijali] -= materijali;
SCMF(playerid, -1, ""ORANGE"BU:RP: "BELA"Uzeli ste '%d grama' materijala iz svoje torbe.", materijali);
print("Test - Materijali/Uzmi");
}
    else SPD(playerid, DIALOG_MATSTORBA, DIALOG_STYLE_LIST, ""CRVENA"Materijali u torbi", "Stavi materijale\nUzmi materijale", "Odaberi", "Nazad");
  }
//------------------------------------------------------------------------------
if(dialogid == DIALOG_OruzjeUtorbi)
{
    new gunname[100];
    //new string[256];
    if(!response) return 1;
    switch(listitem)
    {
        case 0://Stavi
        {
             if(ReduceTime[playerid] == 1)
             {
               SendClientMessage(playerid, COLOR_GREY, ""ORANGE"BU:RP: "SIVAc"Morate sacekati 3 sekunde pre ponovnog koriscenja ove komande !");
               return 1;
             }
             if(PlayerInfo[playerid][zOruzje] != 0 || PlayerInfo[playerid][zMetkovi] != 0)
             {
               SendClientMessage(playerid, COLOR_GREY, ""ORANGE"BU:RP: "SIVAc"Nemate mesta, za jos jedno oruzje !");
               return 1;
             }
             if(GetPlayerWeapon(playerid) == 0)
             {
                SendClientMessage(playerid, -1, ""ORANGE"BU:RP: "SIVAc"Nemate oruzje u ruci!");
                return 1;
             }
             new gunID = GetPlayerWeapon(playerid);
             new gunAmmo = GetPlayerAmmo(playerid);
             if(gunID != 0 && gunAmmo != 0)
             {
               ReduceTime[playerid] = 1;
               SetTimerEx("ReduceTimer", 3000, false, "i", playerid);
               //PlayerInfo[playerid][pInvWeapon] = gunID;
               //PlayerInfo[playerid][pInvAmmo] = gunAmmo;
               PlayerInfo[playerid][zOruzje] = gunID;
               PlayerInfo[playerid][zMetkovi] = gunAmmo;
               RemovePlayerWeapon(playerid, gunID);
               new gunname[100];
               GetWeaponName(gunID, gunname, sizeof(gunname));
               format(string, sizeof(string), ""ORANGE"BU:RP: "BELA"Stavili ste %s u vasu torbu.", gunname);
               SendClientMessage(playerid, COLOR_GREY, string);
               //SacuvajTorbu(playerid);
               return 1;
               }
}
case 1: //Uzmi
{
            if(ReduceTime[playerid] == 1)
            {
                SendClientMessage(playerid, -1, ""ORANGE"BU:RP: "SIVAc"Morate sacekati 3 sekunde pre ponovnog koriscenja ove komande !");
                return 1;
            }
            if(PlayerInfo[playerid][zOruzje] == 0 && PlayerInfo[playerid][zMetkovi] == 0)
            {
                SendClientMessage(playerid, -1, ""ORANGE"BU:RP: "SIVAc"Nemate oruzje u torbi!");
                return 1;
            }
            if(PlayerInfo[playerid][zOruzje] != 0 && PlayerInfo[playerid][zMetkovi] != 0)
            {
                ReduceTime[playerid] = 1;
                SetTimerEx("ReduceTimer", 3000, false, "i", playerid);
                GetWeaponName(PlayerInfo[playerid][zOruzje], gunname, sizeof(gunname));
                JBC_GivePlayerWeapon(playerid, PlayerInfo[playerid][zOruzje], PlayerInfo[playerid][zMetkovi]);
                GetPlayerName(playerid, sendername, sizeof(sendername));
      format(string, sizeof(string), ""ORANGE"BU:RP: "BELA"Uzeli ste %s iz vase torbe.", gunname);
      SendClientMessage(playerid, -1, string);
      //PlayerInfo[playerid][pInvWeapon] = 0;
                //PlayerInfo[playerid][pInvAmmo] = 0;
                PlayerInfo[playerid][zOruzje] = 0;
                PlayerInfo[playerid][zMetkovi] = 0;
                //SacuvajTorbu(playerid);
             }
   }
}
}



Izbacuje mi error na ovoj liniji
35015
if(PlayerInfo[playerid][pMats] < materijali)
35036
if(materijali < 1 || materijali > 5000)
35043 & 35043
PlayerInfo[playerid][pMats] -= materijali;
PlayerInfo[playerid][zMaterijali] += materijali;

35061
if(PlayerInfo[playerid][zMaterijali] < materijali)
35075
if(materijali < 1 || materijali > 1000)
35082 i 35083
PlayerInfo[playerid][pMats] += materijali;
PlayerInfo[playerid][zMaterijali] -= materijali;

Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):
Naslov: Odg: [Pomoc]Nekakav Tag
Poruka od: [CH]Lenon poslato Februar 07, 2015, 13:58:11 POSLE PODNE
Kako si definisao "materijali" ?
Naslov: Odg: [Pomoc]Nekakav Tag
Poruka od: Shaw Salcedo poslato Februar 07, 2015, 15:27:03 POSLE PODNE
new materijal;
Naslov: Odg: [Pomoc]Nekakav Tag
Poruka od: ▂ ▃ ▅ Rudimental ▅ ▃ ▂ poslato Februar 07, 2015, 16:12:32 POSLE PODNE
Citat: Kriso_Anderson poslato Februar 07, 2015, 15:27:03 POSLE PODNE
new materijal;

Ti si tako definisao a kod tebe je materijali
Naslov: Odg: [Pomoc]Nekakav Tag
Poruka od: Shaw Salcedo poslato Februar 07, 2015, 17:11:10 POSLE PODNE
Ma tako i jesam omasio sam sory
Naslov: Odg: [Pomoc]Nekakav Tag
Poruka od: ▂ ▃ ▅ Rudimental ▅ ▃ ▂ poslato Februar 07, 2015, 17:52:55 POSLE PODNE
A kazi ti meni gde si ti to definisao taj new ?
Naslov: Odg: [Pomoc]Nekakav Tag
Poruka od: Shaw Salcedo poslato Februar 07, 2015, 22:54:12 POSLE PODNE
Ma na vrhu ispod response
Naslov: Odg: [Pomoc]Nekakav Tag
Poruka od: ▂ ▃ ▅ Rudimental ▅ ▃ ▂ poslato Februar 07, 2015, 23:02:46 POSLE PODNE
Aj probaj da ga obrises odatle i da ga stavis u dialog


if(dialogid == DIALOG_MSTAVITORBA)
{
    // Ovde definisi taj new
    if(response)
    ...
Naslov: Odg: [Pomoc]Nekakav Tag
Poruka od: arnel avdic poslato Februar 08, 2015, 00:45:51 PRE PODNE
na vrh skripte ispod definea,svih boja itd,
new materijali[MAX_PLAYERS];