warning 211: possibly unintended assignment
#1

http://prntscr.com/h3i4z8

errors:
PHP код:
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\AdminPlugin.pwn(938) : warning 211possibly unintended assignment
C
:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\AdminPlugin.pwn(942) : warning 211possibly unintended assignment
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
2 Warnings

raw code: https://pastebin.com/QhMnhKt8
Reply
#2

You check if X is equal to Y using double "equal sign"
pawn Код:
// correct:
if (X == 1)

// wrong:
if (X = 1)
Reply
#3

PHP код:
    switch(dialogid)
    {
        case 
DIALOG_RENT_PRODUZI:
        {
            if(!
response)
            {
                
TogglePlayerControllable(playerid,1);
                
RemovePlayerFromVehicle(playerid);
                
RentaVozilo[playerid] = 0;
                
SCM(playerid,COLOR_RED,"[RMT Rent a car]:Odustali ste od produzetka renta vozila!");
                
IzvanRentVozila[playerid] = 1;
                
SacuvajRentPoruku[playerid] = 0;
                return 
1;
            }
                new 
vehid GetPlayerVehicleID(playerid);
                if(
VoziloZaRent[vehid] == 1)
                {
                    if(
RentaVozilo[playerid] == 0)
                    {
                        if(
VoziloRentano[vehid] == 0)
                        {
                            if(
GetPlayerMoney(playerid) >= RENT_CIJENA_PREMIER)
                            {
                                
VoziloRentano[vehid] = 1;
                                
RentaVozilo[playerid] = 1;
                                
IDRentVozila[playerid] = vehid;
                                
GivePlayerMoney(playerid,-RENT_CIJENA_PREMIER);
                                
TogglePlayerControllable(playerid,1);
                                
SetTimerEx("DialogRentProduzi"300000false"i"playerid);
                                
IzvanRentVozila[playerid] = 0;
                                
SacuvajRentPoruku[playerid] = 0;
                            }
                            else
                            {
                                
SCM(playerid,COLOR_RED,"[RMT Rent a car]:Nemate dovoljno novca, da rentate ovo vozilo!");
                                
TogglePlayerControllable(playerid,1);
                                
RemovePlayerFromVehicle(playerid);
                                
IzvanRentVozila[playerid] = 1;
                                
SacuvajRentPoruku[playerid] = 0;
                            }
                        }
                    }
                if(
IzvanRentVozila[playerid] == 1)
                {
                    
SacuvajRentPoruku[playerid] = 1;
                }
                if(
SacuvajRentPoruku[playerid] == 1)
                {
                    new 
str[400];
                    
format(str,sizeof(str),""COL_RED"----------------------------\n"COL_WHITE"Dali zelite produziti rentanje vaseg vozila za 5 minuta za istu cijenu kao na pocetku?\n----------------------------");
                    
Dialog(playerid,DIALOG_RENT_PRODUZI,DIALOG_STYLE_MSGBOX,""COL_BLUE"Produzetak renta:",str,""COL_WHITE"Produzi",""COL_WHITE"Odustani");
                }
            }
            return 
1;
        }
    }
    return 
1;

Try this.
Actually it should be
if(IzvanRentVozila[playerid] == 1) instead of a single "=" there.

EDIT: a bit late than Konstantinos
Reply
#4

ooooh what stupid mistakes i was just copy pyasting from above.
lol that seems funny
rep both of you just bcz of my stupidity
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)