[POMOC]Error: must be lvalue (non-constant)

Započeo [BR]Maki187, Oktobar 11, 2011, 17:07:22 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: larp
Detaljan opis problema: Ovako, editujem ravens vec neko vreme, i posto imam bug da kad si na poslu i kucas /tlc a pd/fbi si, tebi se stvori marker i tako moze da se brzo obavlja posao, ja sam to pokusao da resim na sledeci nacin (dole), ali su se posle compila pojavili cudni erori, a to su sledeci

C:\DOCUME~1\Marko\Desktop\BALKAN~1.0\GAMEMO~1\larp.pwn(34385) : error 022: must be lvalue (non-constant)
C:\DOCUME~1\Marko\Desktop\BALKAN~1.0\GAMEMO~1\larp.pwn(34385) : error 022: must be lvalue (non-constant)
C:\DOCUME~1\Marko\Desktop\BALKAN~1.0\GAMEMO~1\larp.pwn(34385) : error 022: must be lvalue (non-constant)
C:\DOCUME~1\Marko\Desktop\BALKAN~1.0\GAMEMO~1\larp.pwn(34385) : fatal error 107: too many error messages on one line


trazio sam taj eror (must be lvalue (non-constant)) i na samp wiki, i u search na forumu i nisam naso nista korisno, tj to cak na samp wiki ni nepostoji....
Dio skripte: if(!strcmp(cmdtext, "/tracelastcall", true) || !strcmp(cmdtext, "/tlc", true)) // By LordMan
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "   You need to login first ");
            return 1;
        }
        if(IsACop(playerid))
        {
            if(pdtrace == 0 || pdtrace_x == 0 || pdtrace_y == 0 || pdtrace_z == 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "** Error at locating the caller ");
                return 1;
            }
if(PlayerInfo[playerid][pDBanned] == 1)
{
    SendClientMessage(playerid, COLOR_GREY, "** You are banned From Cop Duty!");
    return 1;
}
            SendClientMessage(playerid, COLOR_WHITE, "Last caller's place marked red on a map");
            SendClientMessage(playerid, COLOR_WHITE, "HINT: /removegps to remove a red marker");
SetPlayerCheckpoint(playerid,pdtrace_x,pdtrace_y,pdtrace_z,8.0);
            return 1;
        }
        else if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
        {
            if(emdtrace == 0 || emdtrace_x == 0 || emdtrace_y == 0 || emdtrace_z == 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "   Error at locating the caller ");
                return 1;
            }
            SendClientMessage(playerid, COLOR_WHITE, "Last caller's place marked red on a map");
            SendClientMessage(playerid, COLOR_WHITE, "HINT: /removegps to remove a red marker");
SetPlayerCheckpoint(playerid,emdtrace_x,emdtrace_y,emdtrace_z,8.0);
            return 1;
        }
        else if(PlayerIsVozacV[playerid] = 1 || PlayerIsVozacV[playerid] = 2 || PlayerIsVozacV[playerid] = 3 || PlayerIsVozacV[playerid] = 4)
        {
            SendClientMessage(playerid, COLOR_WHITE, "Nemozes da lociras dok si na poslu!");
            return 1;
        }
        else if(PlayerIsVozacV[playerid] = 5 || PlayerIsVozacV[playerid] = 6 || PlayerIsVozacV[playerid] = 7 || PlayerIsVozacV[playerid] = 8)
        {
            SendClientMessage(playerid, COLOR_WHITE, "Nemozes da lociras dok si na poslu!");
            return 1;
        }
        else if(PlayerIsVozacA[playerid] = 1 || PlayerIsVozacA[playerid] = 2 || PlayerIsVozacA[playerid] = 3 || PlayerIsVozacA[playerid] = 4)
        {
            SendClientMessage(playerid, COLOR_WHITE, "Nemozes da lociras dok si na poslu!");
            return 1;
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "   Nisi clan PD/FBI ! ");
            return 1;
        }

    }
    return 1;
}


Ovaj deo nemozes da lociras dok si na poslu sam ja ubacio...
To sam pokusao da ubacim za posao pilota i vozovodje, unapred hvala, molim vas ako neko ima resenje da mi kaze...

Neke slike/video za lakse dobivanje pomoci(neobavezno):

i da neotvaram jos jednu temu, imam problem, kad ugasim vozilo na /engine, lik m ise bolkira, i nemogu da upalim posle vozilo, tj kad kucam /engine, opet pise da se gasi vozilo, i tako stalno... :/

evo slike

http://www.dodaj.rs/f/1G/8l/3lpSrgds/sa-mp-249.png

EDIT: Evo i dela za engine

if(!strcmp(cmd, "/engine", true))
{
    if(IsPlayerConnected(playerid))
    {
if(IsPlayerInAnyVehicle(playerid))
{
    if(!engineOn[GetPlayerVehicleID(playerid)])
    {
        if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return 1;
if(pveh == 510 || pveh == 462 || pveh == 481 || pveh == 509) return 1;
if(IsARentableCar(idcar))
{
    if(HireCar[playerid] != idcar) return 1;
}
if(IsAHarvest(idcar)) return 1;
if(IsADrugHarvest(idcar)) return 1;
if(IsASweeper(idcar)) return 1;


if(CanTurnEngine[playerid] != idcar && CanTurnEngine[playerid] == 9999)
return SendClientMessage(playerid, COLOR_GREY,"* You cannot turn this car's engine!");

format(string, sizeof(string), "* %s spins a key and tries to start vehicle engine.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
SetTimerEx("StartingTheVehicle",3500,0,"i",playerid);
GameTextForPlayer(playerid, "~w~Starting vehicle engine...",3500,3);
gEngine[playerid] = 1;
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /engine",d,m,y,h,mi,s,sendername);
CommandLog(string);
return 1;
}
else if(engineOn[GetPlayerVehicleID(playerid)])
    {
        if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return 1;
if(pveh == 510 || pveh == 462 || pveh == 481 || pveh == 509) return 1;
if(IsARentableCar(idcar))
{
    if(HireCar[playerid] != idcar) return 1;
}
if(IsAHarvest(idcar)) return 1;
if(IsADrugHarvest(idcar)) return 1;
if(IsASweeper(idcar)) return 1;

if(CanTurnEngine[playerid] != idcar && CanTurnEngine[playerid] == 9999)
return SendClientMessage(playerid, COLOR_GREY,"* You cannot turn this car's engine!");

format(string, sizeof(string), "* %s spins a key and turns off the engine.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
GameTextForPlayer(playerid, "~w~Engine Shat Down.",3500,3);
gEngine[playerid] = 0;
TogglePlayerControllable(playerid, 0);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /engine",d,m,y,h,mi,s,sendername);
CommandLog(string);
return 1;
}
}
    }
    return 1;
}
Poslednja Izmena: Oktobar 11, 2011, 19:31:50 POSLE PODNE od [A]Maki187

daj te linije desu ti errori
Respect: Gagi, Maki187, Phillips, TerminuS, Neno, Lepotic, [AL] K4[Я]!K3â,,¢, Gotti747

dao sam gore sve, al evo tacno tog dela

else if(PlayerIsVozacV[playerid] = 1 || PlayerIsVozacV[playerid] = 2 || PlayerIsVozacV[playerid] = 3 || PlayerIsVozacV[playerid] = 4)
        {
            SendClientMessage(playerid, COLOR_WHITE, "Nemozes da lociras dok si na poslu!");
            return 1;
        }
        else if(PlayerIsVozacV[playerid] = 5 || PlayerIsVozacV[playerid] = 6 || PlayerIsVozacV[playerid] = 7 || PlayerIsVozacV[playerid] = 8)
        {
            SendClientMessage(playerid, COLOR_WHITE, "Nemozes da lociras dok si na poslu!");
            return 1;
        }
        else if(PlayerIsVozacA[playerid] = 1 || PlayerIsVozacA[playerid] = 2 || PlayerIsVozacA[playerid] = 3 || PlayerIsVozacA[playerid] = 4)
        {
            SendClientMessage(playerid, COLOR_WHITE, "Nemozes da lociras dok si na poslu!");
            return 1;
        }


nzm u cemu je problem radio sal slicne stvari vise puta i lepo je radilo, a kad god poksuam sa ovom komandom nesto, uvek nesto neradi kako treba...

Evo ti jedan delic koji si pogresio:

else if(PlayerIsVozacV[playerid] = 1 || PlayerIsVozacV[playerid] = 2 || PlayerIsVozacV[playerid] = 3 || PlayerIsVozacV[playerid] = 4)


ispravka:

        else if(PlayerIsVozacV[playerid] == 1 || PlayerIsVozacV[playerid] == 2 || PlayerIsVozacV[playerid] == 3 || PlayerIsVozacV[playerid] == 4)


hvala, probacu tako :)

edit: hvala puno MicroD, sad nema erora... hvala :)

ja u ovom za /engine nisam naso nijendu gresku... nzm u ceu je prob. sa tim... hvala jos jednom :)


EDIT: Moze lock, resio sam  ovo sa /engine

Poslednja Izmena: Oktobar 11, 2011, 20:42:31 POSLE PODNE od [A]Maki187