Warning (+rep)
#1

Hello , Today I did a command for Donator Rank, but I have a problem
gmraul.pwn(18193) : warning 204: symbol is assigned a value that is never used: "carid"
The Line "18193" it's else if(GetPLayer... with pPcarkey2

Code :
pawn Код:
else if(strcmp(x_nr,"neon",true) == 0)
            {
                new carid;
                if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { carid = PlayerInfo[playerid][pPcarkey]; }
                else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { carid = PlayerInfo[playerid][pPcarkey2]; }
               
                else { return 1; }
                if(PlayerInfo[playerid][pDonateRank] < 2)
                {
                SendClientMessage(playerid, 0x4FA7FFFF, "*** Trebuie sa ai cont donator !");
                return 1;
                }
                  ShowPlayerDialog(playerid, 8899, DIALOG_STYLE_LIST, "Pick Neon Color", "Blue\nRed\nGreen\nWhite\nPink\nYellow\nPolice Strobe\nInterior Lights\nBack Neon\nFront neon\nUndercover Roof Light\nRemove All Neon", "Select", "Cancel");
                 PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0);
                    return 1;
    }
How can I fix it?
Reply
#2

Well the issue is simple, you are initializing a variable called "carid", you store information in it but you never make use of that information. Therefore the variable is completely useless and a waste of allocated memory
Reply
#3

And How Can I fix it? Im newbie..
Reply
#4

Well what do you do with something that is useless? Remove it!

Your carid variable is useless, so remove it

Or, alternatively, make use of it!
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)