2 Warnings
#1

Код:
warning 204: symbol is assigned a value that is never used: "file"
pawn Код:
CMD:admins(playerid, params[])
{
    SendCommandToAdmins(playerid,"/admins");
    new count = 0;
    new AdminString[1500];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if (IsPlayerConnected(i))
        {
            if(PlayerInfo[i][AdminLevel] >= 1)
            {
                if(IsPlayerAdmin(i))
                {
                    AdmRank = "{FF0000}RCON {FFFFFF}Administrator";
                }
                else
                {
                    switch(PlayerInfo[i][AdminLevel])
                    {
                        case 1:
                        {
                            AdmRank = "{00FF00}Helper {FFFFFF}Moderator";
                        }
                        case 2:
                        {
                            AdmRank = "{FFFFFF}Trial {FF0000}Modetator";
                        }
                        case 3:
                        {
                            AdmRank = "{FF0000}Moderator";
                        }
                        case 4:
                        {
                            AdmRank = "{FF0000}Adminitrator";
                        }
                        case 5:
                        {
                            AdmRank = "{FFFFFF}Head Administrator";
                        }
                        case 6:
                        {
                            AdmRank = "{FFFFFF}Manager";
                        }
                        case 7:
                        {
                            AdmRank = "{FFFFFF}Server Owner";
                        }
                    }
                }
                new file[300];
                new name[MAX_PLAYER_NAME];
                GetPlayerName(i, name, sizeof(name));
                format(AdminString, sizeof(AdminString), "%s{FF00FF}Level: {FF0000}%d {FF00FF}- {00FF00}%s (Id:{FF0000}%i{00FF00}) {FF00FF}| %s \n",AdminString, PlayerInfo[i][AdminLevel], PlayerName2(i),i,AdmRank);
                count++;
            }
        }
    }
    if (count == 0)
    {
        ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_MSGBOX, "[!] Online Admins", "No online admins", "Close", "");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_MSGBOX, "[!] Online Admins", AdminString, "Close", "");
    }
    return 1;
}
Код:
warning 204: symbol is assigned a value that is never used: "ExitPlutoniumBar"
pawn Код:
if(pickupid == armourtdm[0])
    {
        new Float:armour;
        GetPlayerArmour(playerid, armour);
        new Float:health;
        GetPlayerHealth(playerid, health);
        if(armour != 100)
        {
            SetPlayerArmour(playerid, 100);
            SetPlayerHealth(playerid, health);
            PlaySound(playerid, 1138);
            GameTextForPlayer(playerid, "~r~Armour!", 2000, 1);
            DestroyPickup(armourtdm[0]);
        }
    }
and btw how to hash passwords?
Reply
#2

Use WP_Hash/WhirlPool

Example(as found in my script)
pawn Код:
stock PasswordHash(value[])
{
    new buffer[129];
    WP_Hash(buffer,sizeof(buffer),value);
    return buffer;
}
This then returns the hashed password. To check passwords you'd use,
if(!strcmp(PasswordHash(inputtext), variable, false))

Of-course the variable would be where-ever the users password gets stored. Change inputtext accordingly(since I use dialogs for logging in.)

And for the first warning, you declare file how-ever never use it. Remove it. The other warning just means you assign a variable a value, and never end up using it. It should be noted that none of these warnings will affect anything.
Reply
#3

Код:
symbol is assigned a value that is never used: "file"
symbol is assigned a value that is never used: "ExitPlutoniumBar"
You never use "file" and "ExitPulotiniumBar" that means you will need to remove them or use them.

pawn Код:
new file[300]; // remove this lines from your script, as I see you don't need to use it.
new ExitPlutoniumBar[MAX_PLAYERS]; // I think you should have this lines on your script, or somthings like dat.
// So, just do :
    if(pickupid == armourtdm[0])
    {
        new Float:armour;
        GetPlayerArmour(playerid, armour);
        new Float:health;
        GetPlayerHealth(playerid, health);
        if(armour != 100)
        {
             ExitPlutoniumBar[playerid] = 1; // we turn the variable, I don't know what u try to do, so remove it if you don't need it.
            SetPlayerArmour(playerid, 100);
            SetPlayerHealth(playerid, health);
            PlaySound(playerid, 1138);
            GameTextForPlayer(playerid, "~r~Armour!", 2000, 1);
            DestroyPickup(armourtdm[0]);
        }
    }
Reply
#4

thanks it work
@Abagail i will do that
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)