[pomoc]kapija

Započeo [UG]Cile, Avgust 30, 2011, 12:38:22 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim: Balkan nations
Detaljan opis problema: Napravio sam kapiju i konvertovao i napravio al mi izbaci warning i kapija nece da se spusti ..
evo warning:
C:\Documents and Settings\Admin\Desktop\Balkan Nations\gamemodes\BN.pwn(21978) : warning 225: unreachable code
C:\Documents and Settings\Admin\Desktop\Balkan Nations\gamemodes\BN.pwn(21981) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Admin\Desktop\Balkan Nations\gamemodes\BN.pwn(21984) : warning 209: function "cmd_otvori" should return a value
C:\Documents and Settings\Admin\Desktop\Balkan Nations\gamemodes\BN.pwn(22049) : warning 225: unreachable code
C:\Documents and Settings\Admin\Desktop\Balkan Nations\gamemodes\BN.pwn(22052) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Admin\Desktop\Balkan Nations\gamemodes\BN.pwn(22055) : warning 209: function "cmd_zatvori" should return a value

Dio skripte:

if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
         {
            SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na Taxi Bazi.");
            MoveObject(taxikapija, 969, 1265.5, -1842.5, 12.39999961853, 2.5);
            return 1;
            }

Neke slike/video za lakse dobivanje pomoci(neobavezno): Moze mi ko pomoc ?
Poslednja Izmena: Avgust 30, 2011, 12:38:53 POSLE PODNE od [BUL] Cile



Citat: [BUL] Cile poslato Avgust 30, 2011, 12:38:22 POSLE PODNE
Skripta koju koristim: Balkan nations
Detaljan opis problema: Napravio sam kapiju i konvertovao i napravio al mi izbaci warning i kapija nece da se spusti ..
evo warning:
C:\Documents and Settings\Admin\Desktop\Balkan Nations\gamemodes\BN.pwn(21978) : warning 225: unreachable code
C:\Documents and Settings\Admin\Desktop\Balkan Nations\gamemodes\BN.pwn(21981) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Admin\Desktop\Balkan Nations\gamemodes\BN.pwn(21984) : warning 209: function "cmd_otvori" should return a value
C:\Documents and Settings\Admin\Desktop\Balkan Nations\gamemodes\BN.pwn(22049) : warning 225: unreachable code
C:\Documents and Settings\Admin\Desktop\Balkan Nations\gamemodes\BN.pwn(22052) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Admin\Desktop\Balkan Nations\gamemodes\BN.pwn(22055) : warning 209: function "cmd_zatvori" should return a value

Dio skripte:

if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
         {
            SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na Taxi Bazi.");
            MoveObject(taxikapija, 969, 1265.5, -1842.5, 12.39999961853, 2.5);
            return 1;
            }

Neke slike/video za lakse dobivanje pomoci(neobavezno): Moze mi ko pomoc ?

daj cijele komande..
Vratio sam se ponovo ocekjute novi server...

Citat: StjepanS poslato Avgust 30, 2011, 12:50:32 POSLE PODNE
Vec negdje u GM postoji komanda /otvori ..
Bolje obrisi ovaj post da ti se neko ne smeje  ;)

Sto se tice tih komandi lepo pise da nemaju return  ;) Postavi te sve linije da bi ti mogli pomoci

Nadji ovo:

CMD:otvori(playerid,params[])
{
//neke linije
//ispred zadnje zatvorene zagrade dodaj:
return 1;
}


Isto tako i za CMD:zatvori
Aequam memento rebus in arduis servare mentem.

if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
         {
            SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na Taxi Bazi.");
            MoveObject(taxikapija, 969, 1265.5, -1842.5, 12.39999961853, 2.5);
            }
         return 1;


eto kako sam uradio ..
negdje ima greska dok izbacuje warninge ..
Poslednja Izmena: Avgust 30, 2011, 13:15:52 POSLE PODNE od [BUL] Cile



Pa prije zatvorene zagrade, ne poslije!
Aequam memento rebus in arduis servare mentem.


Citat: [BUL] Cile poslato Avgust 30, 2011, 14:18:17 POSLE PODNE
nerazumijem te ..
if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
         {
            SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na Taxi Bazi.");
            MoveObject(taxikapija, 969, 1265.5, -1842.5, 12.39999961853, 2.5);
            return 1;
}


?

COMMAND:otvori(playerid, params[])
   {
       if (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
         {
            SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na FBI Bazi.");
            MoveObject(fbikapija, 1643.87658691,-1711.34570312,14.75937271, 2);
            return 1;
         }
         if (PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
         {
            SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na UR Bazi.");
            MoveObject(urkapija, 2581.64453125, -2120.92822266, -3.25202560, 2.0);
            return 1;
         }
         if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
         {
            SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na NGR Bazi.");
            MoveObject(ngrgate, 977.79949951,-1288.89501953,9.54687500, 2.0);
            return 1;
         }
         if (PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
         {
            SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na ESL Bazi.");
            MoveObject(eslkapija, 2227.505859375, -2208.2270507813, 14.296855926514, 2.5);
            MoveObject(eslkapija2, 2241.490234375, -2222.306640625, 14.321866989136, 2.5);
            return 1;
         }
       if(PlayerInfo[playerid][pMember] == 9 ||PlayerInfo[playerid][pLeader] == 9)
        {
                MoveObject(cnnkapija, 765.2412109375, -1330.5197753906, 12.790742874146,  2.5);
                SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na CNN bazi.");
            return 1;
       }
       else if(PlayerInfo[playerid][pMember] == 6 ||PlayerInfo[playerid][pLeader] == 6)
        {
                MoveObject(fbigate, 1014.41577148,-1530.65002441,16.21188927, 2.5);
                SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na Yakuza bazi.");
            return 1;
       }
       else if(PlayerInfo[playerid][pMember] == 5||PlayerInfo[playerid][pLeader] == 5)
        {
                MoveObject(lcngate1, 784.59197998,-1152.51306152,15.31416512, 2.5);
                SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na LCN bazi.");
            return 1;
       }
       else if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1)
        {

                MoveDynamicObject(Policedep, 1589.0319824219, -1638.1224365234, 3.997100830078, 2.5);
              SendClientMessage(playerid, COLOR_GREY, "Otvaras PD garazu.");
          }
       else if(PlayerInfo[playerid][pMember] == 3 ||PlayerInfo[playerid][pLeader] == 3)
         {
                MoveDynamicObject(cnngate1, 310.92169189453,-1554.74609375,21.41735458374, 2.5);
                SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na SWAT bazi.");
            return 1;
        }
       else if(PlayerInfo[playerid][pMember] == 8||PlayerInfo[playerid][pLeader] == 8)
        {
                MoveObject(hitmangate1, 1285.64392090,-1647.90173340,6.11679268, 2.5);
                MoveObject(hitmangate2, 1285.62097168,-1656.64892578,6.11679268, 2.5);
                SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na Hitman bazi.");
            
       }
      return 1;
      if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
         {
            SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na Taxi Bazi.");
            MoveObject(taxikapija, 969, 1265.5, -1842.5, 12.39999961853, 2.5);
            }
         return 1;
      }



Krivo si koridnate stavio :
Fix :
if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
         {
            SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na Taxi Bazi.");
            MoveObject(taxikapija, 1265.5, -1842.5, 12.39999961853, 2.5);
            return 1;
}


Citat: [BUL] Cile poslato Avgust 30, 2011, 14:30:25 POSLE PODNE
opet isto :S
probaj ovako cijelu komandu :
COMMAND:otvori(playerid, params[])
    {
        if (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
         {
            SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na FBI Bazi.");
            MoveObject(fbikapija, 1643.87658691,-1711.34570312,14.75937271, 2);
            return 1;
         }
         if (PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
         {
            SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na UR Bazi.");
            MoveObject(urkapija, 2581.64453125, -2120.92822266, -3.25202560, 2.0);
            return 1;
         }
         if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
         {
            SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na NGR Bazi.");
            MoveObject(ngrgate, 977.79949951,-1288.89501953,9.54687500, 2.0);
            return 1;
         }
         if (PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
         {
            SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na ESL Bazi.");
            MoveObject(eslkapija, 2227.505859375, -2208.2270507813, 14.296855926514, 2.5);
            MoveObject(eslkapija2, 2241.490234375, -2222.306640625, 14.321866989136, 2.5);
            return 1;
         }
       if(PlayerInfo[playerid][pMember] == 9 ||PlayerInfo[playerid][pLeader] == 9)
        {
                MoveObject(cnnkapija, 765.2412109375, -1330.5197753906, 12.790742874146,  2.5);
                SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na CNN bazi.");
            return 1;
       }
       else if(PlayerInfo[playerid][pMember] == 6 ||PlayerInfo[playerid][pLeader] == 6)
        {
                MoveObject(fbigate, 1014.41577148,-1530.65002441,16.21188927, 2.5);
                SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na Yakuza bazi.");
            return 1;
       }
       else if(PlayerInfo[playerid][pMember] == 5||PlayerInfo[playerid][pLeader] == 5)
        {
                MoveObject(lcngate1, 784.59197998,-1152.51306152,15.31416512, 2.5);
                SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na LCN bazi.");
            return 1;
       }
       else if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1)
        {

                MoveDynamicObject(Policedep, 1589.0319824219, -1638.1224365234, 3.997100830078, 2.5);
              SendClientMessage(playerid, COLOR_GREY, "Otvaras PD garazu.");
          }
       else if(PlayerInfo[playerid][pMember] == 3 ||PlayerInfo[playerid][pLeader] == 3)
         {
                MoveDynamicObject(cnngate1, 310.92169189453,-1554.74609375,21.41735458374, 2.5);
                SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na SWAT bazi.");
            return 1;
        }
       else if(PlayerInfo[playerid][pMember] == 8||PlayerInfo[playerid][pLeader] ==
        {
                MoveObject(hitmangate1, 1285.64392090,-1647.90173340,6.11679268, 2.5);
                MoveObject(hitmangate2, 1285.62097168,-1656.64892578,6.11679268, 2.5);
                SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na Hitman bazi.");
       }
      if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
         {
            SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na Taxi Bazi.");
            MoveObject(taxikapija, 969, 1265.5, -1842.5, 12.39999961853, 2.5);
            }
         return 1;
      }

sad 2 warninga i 3 errora :S

C:\Documents and Settings\Admin\Desktop\Balkan Nations\gamemodes\BN.pwn(21974) : error 008: must be a constant expression; assumed zero
C:\Documents and Settings\Admin\Desktop\Balkan Nations\gamemodes\BN.pwn(21977) : warning 209: function "cmd_otvori" should return a value
C:\Documents and Settings\Admin\Desktop\Balkan Nations\gamemodes\BN.pwn(21978) : error 010: invalid function or declaration
C:\Documents and Settings\Admin\Desktop\Balkan Nations\gamemodes\BN.pwn(21983) : error 010: invalid function or declaration
C:\Documents and Settings\Admin\Desktop\Balkan Nations\gamemodes\BN.pwn(22049) : warning 225: unreachable code




COMMAND:otvori(playerid, params[])
{
         if (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
         {
            SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na FBI Bazi.");
            MoveObject(fbikapija, 1643.87658691,-1711.34570312,14.75937271, 2);
            return 1;
         }
         if (PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
         {
            SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na UR Bazi.");
            MoveObject(urkapija, 2581.64453125, -2120.92822266, -3.25202560, 2.0);
            return 1;
         }
         if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
         {
            SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na NGR Bazi.");
            MoveObject(ngrgate, 977.79949951,-1288.89501953,9.54687500, 2.0);
            return 1;
         }
         if (PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
         {
            SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na ESL Bazi.");
            MoveObject(eslkapija, 2227.505859375, -2208.2270507813, 14.296855926514, 2.5);
            MoveObject(eslkapija2, 2241.490234375, -2222.306640625, 14.321866989136, 2.5);
            return 1;
         }
         if(PlayerInfo[playerid][pMember] == 9 ||PlayerInfo[playerid][pLeader] == 9)
         {
                MoveObject(cnnkapija, 765.2412109375, -1330.5197753906, 12.790742874146,  2.5);
                SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na CNN bazi.");
                return 1;
        }
        if(PlayerInfo[playerid][pMember] == 6 ||PlayerInfo[playerid][pLeader] == 6)
        {
                MoveObject(fbigate, 1014.41577148,-1530.65002441,16.21188927, 2.5);
                SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na Yakuza bazi.");
                return 1;
       }
       if(PlayerInfo[playerid][pMember] == 5||PlayerInfo[playerid][pLeader] == 5)
       {
                MoveObject(lcngate1, 784.59197998,-1152.51306152,15.31416512, 2.5);
                SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na LCN bazi.");
                return 1;
       }
       if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1)
       {

                MoveDynamicObject(Policedep, 1589.0319824219, -1638.1224365234, 3.997100830078, 2.5);
                SendClientMessage(playerid, COLOR_GREY, "Otvaras PD garazu.");
                return 1;
       }
       if(PlayerInfo[playerid][pMember] == 3 ||PlayerInfo[playerid][pLeader] == 3)
       {
                MoveDynamicObject(cnngate1, 310.92169189453,-1554.74609375,21.41735458374, 2.5);
                SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na SWAT bazi.");
                return 1;
       }
       if(PlayerInfo[playerid][pMember] == 8||PlayerInfo[playerid][pLeader] ==
       {
                MoveObject(hitmangate1, 1285.64392090,-1647.90173340,6.11679268, 2.5);
                MoveObject(hitmangate2, 1285.62097168,-1656.64892578,6.11679268, 2.5);
                SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na Hitman bazi.");
                return 1;
       }
       if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
       {
            SendClientMessage(playerid, COLOR_GREY, "Otvaras kapiju na Taxi Bazi.");
            MoveObject(taxikapija, 969, 1265.5, -1842.5, 12.39999961853, 2.5);
            return 1;
       }
       return 1;
}


To?
Aequam memento rebus in arduis servare mentem.