Really much help needed
#1

pawn Код:
C:\Documents and Settings\Lindvall\Skrivbord\Stor map\Qk server\gamemodes\QKDM.pwn(535) : warning 219: local variable "pCash" shadows a variable at a preceding level
C:\Documents and Settings\Lindvall\Skrivbord\Stor map\Qk server\gamemodes\QKDM.pwn(536) : error 022: must be lvalue (non-constant)
C:\Documents and Settings\Lindvall\Skrivbord\Stor map\Qk server\gamemodes\QKDM.pwn(542) : warning 213: tag mismatch
C:\Documents and Settings\Lindvall\Skrivbord\Stor map\Qk server\gamemodes\QKDM.pwn(542) : warning 206: redundant test: constant expression is non-zero
C:\Documents and Settings\Lindvall\Skrivbord\Stor map\Qk server\gamemodes\QKDM.pwn(548) : warning 213: tag mismatch
C:\Documents and Settings\Lindvall\Skrivbord\Stor map\Qk server\gamemodes\QKDM.pwn(548) : warning 206: redundant test: constant expression is non-zero
C:\Documents and Settings\Lindvall\Skrivbord\Stor map\Qk server\gamemodes\QKDM.pwn(554) : warning 213: tag mismatch
C:\Documents and Settings\Lindvall\Skrivbord\Stor map\Qk server\gamemodes\QKDM.pwn(554) : warning 206: redundant test: constant expression is non-zero
C:\Documents and Settings\Lindvall\Skrivbord\Stor map\Qk server\gamemodes\QKDM.pwn(560) : warning 213: tag mismatch
C:\Documents and Settings\Lindvall\Skrivbord\Stor map\Qk server\gamemodes\QKDM.pwn(560) : warning 206: redundant test: constant expression is non-zero
C:\Documents and Settings\Lindvall\Skrivbord\Stor map\Qk server\gamemodes\QKDM.pwn(566) : warning 213: tag mismatch
C:\Documents and Settings\Lindvall\Skrivbord\Stor map\Qk server\gamemodes\QKDM.pwn(566) : warning 206: redundant test: constant expression is non-zero
C:\Documents and Settings\Lindvall\Skrivbord\Stor map\Qk server\gamemodes\QKDM.pwn(572) : warning 213: tag mismatch
C:\Documents and Settings\Lindvall\Skrivbord\Stor map\Qk server\gamemodes\QKDM.pwn(572) : warning 206: redundant test: constant expression is non-zero
C:\Documents and Settings\Lindvall\Skrivbord\Stor map\Qk server\gamemodes\QKDM.pwn(578) : warning 213: tag mismatch
C:\Documents and Settings\Lindvall\Skrivbord\Stor map\Qk server\gamemodes\QKDM.pwn(578) : warning 206: redundant test: constant expression is non-zero
C:\Documents and Settings\Lindvall\Skrivbord\Stor map\Qk server\gamemodes\QKDM.pwn(584) : warning 213: tag mismatch
C:\Documents and Settings\Lindvall\Skrivbord\Stor map\Qk server\gamemodes\QKDM.pwn(584) : warning 206: redundant test: constant expression is non-zero
C:\Documents and Settings\Lindvall\Skrivbord\Stor map\Qk server\gamemodes\QKDM.pwn(590) : warning 213: tag mismatch
C:\Documents and Settings\Lindvall\Skrivbord\Stor map\Qk server\gamemodes\QKDM.pwn(590) : warning 206: redundant test: constant expression is non-zero
C:\Documents and Settings\Lindvall\Skrivbord\Stor map\Qk server\gamemodes\QKDM.pwn(535) : warning 203: symbol is never used: "pCash"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 9999)
    {
        if(!response) return SendClientMessage(playerid, GREEN, "You have closed the shop without buying anything.");
        {
             new pCash;
             pCash = GetPlayerMoney(playerid);
             if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, COLOR_ORANGE, "You don't have enough money to puchase anything in the shop.");
             switch(listitem)
                {
                     case 0:
                    {
                        if(pCash < 200) return SendClientMessage(playerid, -1, "You do not have enough money.");
                        GivePlayerWeapon(playerid, 22, 150);
                        GivePlayerMoney(playerid,-200);
                    }
                    case 1:
                    {
                        if(pCash < 1000) return SendClientMessage(playerid, -1, "You do not have enough money.");
                        GivePlayerWeapon(playerid, 23, 150);
                        GivePlayerMoney(playerid,-1000);
                   }
                   case 2:
                   {
                       if(pCash < 1500) return SendClientMessage(playerid, -1, "You do not have enough money.");
                       GivePlayerWeapon(playerid, 24, 150);
                       GivePlayerMoney(playerid,-1500);
                   }
                   case 3:
                   {
                       if(pCash < 1500) return SendClientMessage(playerid, -1, "You do not have enough money.");
                       GivePlayerWeapon(playerid, 29, 150);
                       GivePlayerMoney(playerid,-1500);
                   }
                   case 4:
                   {
                       if(pCash < 1500) return SendClientMessage(playerid, -1, "You do not have enough money.");
                       GivePlayerWeapon(playerid, 25, 150);
                       GivePlayerMoney(playerid,-1500);
                   }
                   case 5:
                   {
                       if(pCash < 3500) return SendClientMessage(playerid, -1, "You don't have enough money.");
                       GivePlayerWeapon(playerid, 27, 150);
                       GivePlayerMoney(playerid,-3500);
                   }
                   case 6:
                   {
                       if(pCash < 4500) return SendClientMessage(playerid, -1, "You don't have enough money.");
                       GivePlayerWeapon(playerid, 30, 200);
                       GivePlayerMoney(playerid,-4500);
                   }
                   case 7:
                   {
                       if(pCash < 5000) return SendClientMessage(playerid, -1, "You don't have enough money.");
                       GivePlayerWeapon(playerid, 31, 200);
                       GivePlayerMoney(playerid,-5000);
                   }
                   case 8:
                   {
                       if(pCash < 4500) return SendClientMessage(playerid, -1, "You don't have enough money.");
                       GivePlayerWeapon(playerid, 34, 150);
                       GivePlayerMoney(playerid,-4500);
                   }
             }
        }
    }
    switch( dialogid )
    {
        case DIALOG_REGISTER:
        {
            if (!response) return Kick(playerid);
            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
                new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                INI_WriteInt(File,"Password",udb_hash(inputtext));
                INI_WriteInt(File,"Cash",0);
                INI_WriteInt(File,"Admin",0);
                INI_WriteInt(File,"Kills",0);
                INI_WriteInt(File,"Deaths",0);
                INI_Close(File);

                SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
                SpawnPlayer(playerid);
                ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Great! Your Y_INI system works perfectly. Relog to save your stats!","Ok","");
            }
        }

        case DIALOG_LOGIN:
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
                    ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"You have successfully logged in!","Ok","");
                }
                else
                {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
                }
                return 1;
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Really much help needed - by HighPitchedVoice - 29.06.2012, 13:35
Re: Really much help needed - by Neil. - 29.06.2012, 13:44
Re: Really much help needed - by HighPitchedVoice - 29.06.2012, 13:56
Re: Really much help needed - by Cxnnor - 29.06.2012, 13:58
Re: Really much help needed - by HighPitchedVoice - 29.06.2012, 14:00

Forum Jump:


Users browsing this thread: 1 Guest(s)