Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: Dejaniko poslato April 09, 2022, 12:45:53 POSLE PODNE

Naslov: Moze pomoc?
Poruka od: Dejaniko poslato April 09, 2022, 12:45:53 POSLE PODNE
Problem(error/warning):
(50862)error 029: invalid expression, assumed zero
(50862)warning 215: expression has no effect
(50862)error 001: expected token: ";", but found "]"
(50862)error 029: invalid expression, assumed zero
(50862)fatal error 107: too many error messages on one line
Deo skripte: [pawn]}
if(odabranslot[playerid] == 1 && IsPlayerInVehicle(playerid, vVoziloID[playerid]))
{[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [pawn]///[/pawn]
Slika/video ingame problema(obavezno ako je ingame problem): ///
Naslov: Odg: Moze pomoc?
Poruka od: markosimic poslato April 09, 2022, 13:38:08 POSLE PODNE
https://balkan-samp.com/forum/index.php?topic=138030.0
Naslov: Odg: Moze pomoc?
Poruka od: Qiyamet poslato April 09, 2022, 15:30:56 POSLE PODNE
Citat: Dejaniko poslato April 09, 2022, 12:45:53 POSLE PODNE
Problem(error/warning):
(50862)error 029: invalid expression, assumed zero
(50862)warning 215: expression has no effect
(50862)error 001: expected token: ";", but found "]"
(50862)error 029: invalid expression, assumed zero
(50862)fatal error 107: too many error messages on one line
Deo skripte: [pawn]}
if(odabranslot[playerid] == 1 && IsPlayerInVehicle(playerid, vVoziloID[playerid]))
{[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [pawn]///[/pawn]
Slika/video ingame problema(obavezno ako je ingame problem): ///
daj mi citavu komandu, u ovom dijelu koda nema greske.
Naslov: Odg: Moze pomoc?
Poruka od: Dejaniko poslato April 09, 2022, 23:54:41 POSLE PODNE
[pawn]   if(dialogid == DIALOG_TFELGE && response)
      {
         new componentid;
         new cijena;
          if(listitem == 0)
          {
          componentid = 1073;
          cijena = 1200;
          }
          else if(listitem == 1)
          {
          componentid = 1074;
          cijena = 1500;
          }
          else if(listitem == 2)
          {
          componentid = 1078;
          cijena = 1000;
          }
          else if(listitem == 3)
          {
          componentid = 1079;
          cijena = 3000;
          }
          else if(listitem == 4)
          {
          componentid = 1085;
          cijena = 2750;
          }
          else if(listitem == 5)
          {
          componentid = 1086;
          cijena = 2000;
          }
          else if(listitem == 6)
          {
            componentid = 1083;
          cijena = 2200;
          }
          if(PI[playerid][pNovac] < cijena)
          {
          SendClientMessage(playerid, SIVA, "Nemas dovoljno novca.");
          return 1;
          }
          if(odabranslot[playerid] == 1 && IsPlayerInVehicle(playerid, vVoziloID, playerid))
         {
         SCMF(playerid, SIVA, "{FFFFFF}[LW | RP]: {FA8072}Uspijesno ste ugradili felge. {FFFFFF}| {FA8072}Cijena: %d$",cijena);
         DajNovac(playerid,-cijena);
         SBizzInfo[21][sbTill] += cijena;
         AddVehicleComponent(GetPlayerVehicleID(playerid), componentid);
         new tuningid = PI[playerid][pAuto];
         if(VoziloInfo[tuningid][cComponent0]==0)
         {
         VoziloInfo[tuningid][cComponent0]=componentid;
         SaveVozilo(tuningid);
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent1]==0)
         {
         VoziloInfo[tuningid][cComponent1]=componentid;
         SaveVozilo(tuningid);
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent2]==0)
         {
         VoziloInfo[tuningid][cComponent2]=componentid;
         SaveVozilo(tuningid);
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent3]==0)
         {
         VoziloInfo[tuningid][cComponent3]=componentid;
         SaveVozilo(tuningid);
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent4]==0)
         {
         VoziloInfo[tuningid][cComponent4]=componentid;
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent5]==0)
         {
         VoziloInfo[tuningid][cComponent5]=componentid;
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent6]==0)
         {
         VoziloInfo[tuningid][cComponent6]=componentid;
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent7]==0)
         {
         VoziloInfo[tuningid][cComponent7]=componentid;
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent8]==0)
         {
         VoziloInfo[tuningid][cComponent8]=componentid;
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent9]==0)
         {
         VoziloInfo[tuningid][cComponent9]=componentid;
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent10]==0)
         {
         VoziloInfo[tuningid][cComponent10]=componentid;
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent11]==0)
         {
         VoziloInfo[tuningid][cComponent11]=componentid;
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent12]==0)
         {
         VoziloInfo[tuningid][cComponent12]=componentid;
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent13]==0)
         {
         VoziloInfo[tuningid][cComponent13]=componentid;
         return 1;
         }
         SaveVozilo(tuningid);
          }[/pawn]
Naslov: Odg: Moze pomoc?
Poruka od: Qiyamet poslato April 10, 2022, 00:02:13 PRE PODNE
Citat: Dejaniko poslato April 09, 2022, 23:54:41 POSLE PODNE
[pawn]   if(dialogid == DIALOG_TFELGE && response)
      {
         new componentid;
         new cijena;
          if(listitem == 0)
          {
          componentid = 1073;
          cijena = 1200;
          }
          else if(listitem == 1)
          {
          componentid = 1074;
          cijena = 1500;
          }
          else if(listitem == 2)
          {
          componentid = 1078;
          cijena = 1000;
          }
          else if(listitem == 3)
          {
          componentid = 1079;
          cijena = 3000;
          }
          else if(listitem == 4)
          {
          componentid = 1085;
          cijena = 2750;
          }
          else if(listitem == 5)
          {
          componentid = 1086;
          cijena = 2000;
          }
          else if(listitem == 6)
          {
            componentid = 1083;
          cijena = 2200;
          }
          if(PI[playerid][pNovac] < cijena)
          {
          SendClientMessage(playerid, SIVA, "Nemas dovoljno novca.");
          return 1;
          }
          if(odabranslot[playerid] == 1 && IsPlayerInVehicle(playerid, vVoziloID, playerid))
         {
         SCMF(playerid, SIVA, "{FFFFFF}[LW | RP]: {FA8072}Uspijesno ste ugradili felge. {FFFFFF}| {FA8072}Cijena: %d$",cijena);
         DajNovac(playerid,-cijena);
         SBizzInfo[21][sbTill] += cijena;
         AddVehicleComponent(GetPlayerVehicleID(playerid), componentid);
         new tuningid = PI[playerid][pAuto];
         if(VoziloInfo[tuningid][cComponent0]==0)
         {
         VoziloInfo[tuningid][cComponent0]=componentid;
         SaveVozilo(tuningid);
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent1]==0)
         {
         VoziloInfo[tuningid][cComponent1]=componentid;
         SaveVozilo(tuningid);
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent2]==0)
         {
         VoziloInfo[tuningid][cComponent2]=componentid;
         SaveVozilo(tuningid);
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent3]==0)
         {
         VoziloInfo[tuningid][cComponent3]=componentid;
         SaveVozilo(tuningid);
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent4]==0)
         {
         VoziloInfo[tuningid][cComponent4]=componentid;
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent5]==0)
         {
         VoziloInfo[tuningid][cComponent5]=componentid;
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent6]==0)
         {
         VoziloInfo[tuningid][cComponent6]=componentid;
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent7]==0)
         {
         VoziloInfo[tuningid][cComponent7]=componentid;
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent8]==0)
         {
         VoziloInfo[tuningid][cComponent8]=componentid;
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent9]==0)
         {
         VoziloInfo[tuningid][cComponent9]=componentid;
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent10]==0)
         {
         VoziloInfo[tuningid][cComponent10]=componentid;
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent11]==0)
         {
         VoziloInfo[tuningid][cComponent11]=componentid;
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent12]==0)
         {
         VoziloInfo[tuningid][cComponent12]=componentid;
         return 1;
         }
         if(VoziloInfo[tuningid][cComponent13]==0)
         {
         VoziloInfo[tuningid][cComponent13]=componentid;
         return 1;
         }
         SaveVozilo(tuningid);
          }[/pawn]
if(odabranslot[playerid] == 1 && IsPlayerInVehicle(playerid, vVoziloID[playerid]))
{
SCMF(playerid, SIVA, "{FFFFFF}[LW | RP]: {FA8072}Uspijesno ste ugradili felge. {FFFFFF}| {FA8072}Cijena: %d$",cijena);
DajNovac(playerid,-cijena);
SBizzInfo[21][sbTill] += cijena;
AddVehicleComponent(GetPlayerVehicleID(playerid), componentid);
new tuningid = PI[playerid][pAuto];
if(VoziloInfo[tuningid][cComponent0]==0)
{
VoziloInfo[tuningid][cComponent0]=componentid;
SaveVozilo(tuningid);
return 1;
}
if(VoziloInfo[tuningid][cComponent1]==0)
{
VoziloInfo[tuningid][cComponent1]=componentid;
SaveVozilo(tuningid);
return 1;
}
if(VoziloInfo[tuningid][cComponent2]==0)
{
VoziloInfo[tuningid][cComponent2]=componentid;
SaveVozilo(tuningid);
return 1;
}
if(VoziloInfo[tuningid][cComponent3]==0)
{
VoziloInfo[tuningid][cComponent3]=componentid;
SaveVozilo(tuningid);
return 1;
}
if(VoziloInfo[tuningid][cComponent4]==0)
{
VoziloInfo[tuningid][cComponent4]=componentid;
return 1;
}
if(VoziloInfo[tuningid][cComponent5]==0)
{
VoziloInfo[tuningid][cComponent5]=componentid;
return 1;
}
if(VoziloInfo[tuningid][cComponent6]==0)
{
VoziloInfo[tuningid][cComponent6]=componentid;
return 1;
}
if(VoziloInfo[tuningid][cComponent7]==0)
{
VoziloInfo[tuningid][cComponent7]=componentid;
return 1;
}
if(VoziloInfo[tuningid][cComponent8]==0)
{
VoziloInfo[tuningid][cComponent8]=componentid;
return 1;
}
if(VoziloInfo[tuningid][cComponent9]==0)
{
VoziloInfo[tuningid][cComponent9]=componentid;
return 1;
}
if(VoziloInfo[tuningid][cComponent10]==0)
{
VoziloInfo[tuningid][cComponent10]=componentid;
return 1;
}
if(VoziloInfo[tuningid][cComponent11]==0)
{
VoziloInfo[tuningid][cComponent11]=componentid;
return 1;
}
if(VoziloInfo[tuningid][cComponent12]==0)
{
VoziloInfo[tuningid][cComponent12]=componentid;
return 1;
}
if(VoziloInfo[tuningid][cComponent13]==0)
{
VoziloInfo[tuningid][cComponent13]=componentid;
return 1;
}
SaveVozilo(tuningid);
    }

kolko sam ja uspio vidit jedina greska ti je ovde bila
if(odabranslot[playerid] == 1 && IsPlayerInVehicle(playerid, vVoziloID, playerid))
{

ovako treba
if(odabranslot[playerid] == 1 && IsPlayerInVehicle(playerid, vVoziloID[playerid]))
{
Naslov: Odg: Moze pomoc?
Poruka od: Dejaniko poslato April 10, 2022, 00:10:54 PRE PODNE
i dalje imam iste errore
Naslov: Odg: Moze pomoc?
Poruka od: Fergosonn poslato April 11, 2022, 00:53:55 PRE PODNE
https://sampwiki.blast.hk/wiki/IsPlayerInVehicle