Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2012-05-26, 13:56


niree







Wiek: 28
Na forum: 5312 dni
Posty: 22
Nick w MP: nireee_niree



Respekt: 50

Witam, mog? prosi? o popraw? mojego kodu :

Pawn
if(strcmp(cmd"/bwyplac"true) == || strcmp(cmd"/bankomatwyplac"true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerToPoint(3.0playerid,1153.4745, -1430.063115.0933) || PlayerToPoint(3.0playerid1496.2036,-1748.886815.700) || PlayerToPoint(3.0playerid1746.9534,-1943.4465,13.5703) || PlayerToPoint(3.0playerid1757.0641,-1943.4401,13.5703) || PlayerToPoint(3.0playerid1304.95690900,-1359.81958000,18.35354200) || PlayerToPoint(3.0playerid1301.990234375,-1320.08203125,18.30354309082) || PlayerToPoint(3.0playerid1495,-1022.9000244141,23.39999961853) || PlayerToPoint(3.0playerid525.59997558594,-1293.0999755859,16.799999237061))
            {
              if (PlayerInfo[playerid][pKartaBank] == 0)
            {
                SendClientMessage(playeridCOLOR_GRAD2"   Nie posiadasz karty kredytowej (do kupienia w 24/7) !");
                return 1;
            }
                tmp strtok(cmdtextidx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playeridCOLOR_GRAD2"U?YJ: /bwyplac [ilo??]");
                    format(stringsizeof(string), "  Masz $%d na swoim koncie."PlayerInfo[playerid][pAccount]);
                    SendClientMessage(playeridCOLOR_GRAD3string);
                    return 1;
                }
                new cashdeposit strval(tmp);
                if(!strlen(tmp))
                {
                    SendClientMessage(playeridCOLOR_GRAD2"U?YJ: /bwyplac [ilo??]");
                    format(stringsizeof(string), "  Masz $%d na swoim koncie."PlayerInfo[playerid][pAccount]);
                    SendClientMessage(playeridCOLOR_GRAD3string);
                    return 1;
                }
                if (cashdeposit PlayerInfo[playerid][pAccount] || cashdeposit 1)
                {
                    SendClientMessage(playeridCOLOR_GRAD2"   Nie masz a? tyle kasy !");
                    return 1;
                }
                //ConsumingMoney[playerid] = 1;
                 GiveCash(playerid,cashdeposit);
                PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
                format(stringsizeof(string), "  Wyp?aci?e? $%d ze swojego konta. Pozosta?o: $%d "cashdeposit,PlayerInfo[playerid][pAccount]);
                SendClientMessage(playeridCOLOR_YELLOWstring);
                return 1;
               }
            SendClientMessage(playeridCOLOR_GREY"");
             return 1;
        }
        return 1;
    }


Chodzi o linijk? :

Pawn
 if(PlayerToPoint(3.0playerid,1153.4745, -1430.063115.0933) || PlayerToPoint(3.0playerid1496.2036,-1748.886815.700) || PlayerToPoint(3.0playerid1746.9534,-1943.4465,13.5703) || PlayerToPoint(3.0playerid1757.0641,-1943.4401,13.5703) || PlayerToPoint(3.0playerid1304.95690900,-1359.81958000,18.35354200) || PlayerToPoint(3.0playerid1301.990234375,-1320.08203125,18.30354309082) || PlayerToPoint(3.0playerid1495,-1022.9000244141,23.39999961853) || PlayerToPoint(3.0playerid525.59997558594,-1293.0999755859,16.799999237061))


Gdy? jest za d?uga, i wywala mi error podczas kompilacji.
Nie chc?, ?eby jakie? po?o?enie posz?o sie...tylko chce aby kod by? u?o?ony, i ?eby nie by?o erroru podczas kompilacji.

Tak samo z tym :

Pawn
if(strcmp(cmd"/bsuma"true) == || strcmp(cmd"/bankomatsuma"true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerToPoint(3.0playerid,1153.4745, -1430.063115.0933) || PlayerToPoint(3.0playerid1496.2036,-1748.886815.700) || PlayerToPoint(3.0playerid1746.9534,-1943.4465,13.5703) || PlayerToPoint(3.0playerid1757.0641,-1943.4401,13.5703) || PlayerToPoint(3.0playerid1302.4000244141,-1320.8000488281,18.5) || PlayerToPoint(3.0playerid1305.1999511719,-1359,18.5) || PlayerToPoint(3.0playerid1495,-1022.9000244141,23.39999961853) || PlayerToPoint(3.0playerid525.59997558594,-1293.0999755859,16.799999237061))
            {
            if (PlayerInfo[playerid][pKartaBank] == 0)
            {
                SendClientMessage(playeridCOLOR_GRAD2"   Nie posiadasz karty kredytowej (do kupienia w 24/7) !");
                return 1;
            }
                   format(stringsizeof(string), "  Masz $%d na swoim koncie.",PlayerInfo[playerid][pAccount]);
                SendClientMessage(playeridCOLOR_YELLOWstring);
            }
            SendClientMessage(playeridCOLOR_GREY"");
            return 1;
        }
        return 1;
    }


Pawn
if(PlayerToPoint(3.0playerid,1153.4745, -1430.063115.0933) || PlayerToPoint(3.0playerid1496.2036,-1748.886815.700) || PlayerToPoint(3.0playerid1746.9534,-1943.4465,13.5703) || PlayerToPoint(3.0playerid1757.0641,-1943.4401,13.5703) || PlayerToPoint(3.0playerid1302.4000244141,-1320.8000488281,18.5) || PlayerToPoint(3.0playerid1305.1999511719,-1359,18.5) || PlayerToPoint(3.0playerid1495,-1022.9000244141,23.39999961853) || PlayerToPoint(3.0playerid525.59997558594,-1293.0999755859,16.799999237061))


Pozdrawiam.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-05-26, 16:25


Quis

Wszechwiedzący






Wiek: 31
Na forum: 5146 dni
Posty: 464
Nick w MP: Quis

Piwa: 1110

Respekt: 325
Respekt: 325Respekt: 325Respekt: 325

Po prostu po ka?dym "||" daj enter i b?dzie dobrze.

Postaw piwo autorowi tego posta
 

 
Tagi: długi :: kod :: linijce.
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN » [INNE] Za długi kod w linijce. Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku