Invalid expression, assumed zero
#4

Because string1 is empty ?, it does not make sense to define it if you are not going to use it as such. Also the logic you used is wrong, depending on what you want to achieve is in the following code:

PHP код:
if(udb_hash(inputtext) == PlayerInfo[playerid][PASSWORD])
        {
            
// PASSWORD CORRECT
            
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
            
GivePlayerMoney(playeridPlayerInfo[playerid][MONEY]);
        }
        else
        {
            
// WRONG PASSWORD
            
if(GetPVarInt(playerid"FailedLoginAttempt") == 0)
            {
                   
SetPVarInt(playerid"FailedLoginAttempt"1);
                   
SendClientMessage(playerid, -1"SERVER: Password wrong.");
            }
            else if(
GetPVarInt(playerid"FailedLoginAttempt") == 1)
            {
                   
SetPVarInt(playerid"FailedLoginAttempt"2);
                   
SendClientMessage(playerid, -1"SERVER: Password wrong.");
            }
            else if(
GetPVarInt(playerid"FailedLoginAttempt") == 2)
            {
                   
SetPVarInt(playerid"FailedLoginAttempt"3);
                   
SendClientMessage(playerid, -1"SERVER: Password wrong.");
            }
            else if(
GetPVarInt(playerid"FailedLoginAttempt") == 3)
            {
                   
DeletePVar(playerid"FailedLoginAttempt");
                   
SendClientMessage(playerid, -1"SERVER: asdasd.");
                
Kick(playerid);
            }
            
ShowPlayerDialog(playeridLOGINDIALOG_STYLE_PASSWORD"Login""Type your password""Login""Cancel");
        } 
Reply


Messages In This Thread
Invalid expression, assumed zero - by Hunud - 09.04.2017, 18:49
Re: Invalid expression, assumed zero - by raydx - 09.04.2017, 18:57
Re: Invalid expression, assumed zero - by Hunud - 09.04.2017, 19:08
Re: Invalid expression, assumed zero - by Unrea1 - 09.04.2017, 19:13
Re: Invalid expression, assumed zero - by Bwandon - 09.04.2017, 19:25
Re: Invalid expression, assumed zero - by khRamin78 - 09.04.2017, 19:35
Re: Invalid expression, assumed zero - by Hunud - 09.04.2017, 19:52
Re: Invalid expression, assumed zero - by khRamin78 - 09.04.2017, 19:58
Re: Invalid expression, assumed zero - by Hunud - 09.04.2017, 20:03
Re: Invalid expression, assumed zero - by Hunud - 09.04.2017, 20:22

Forum Jump:


Users browsing this thread: 1 Guest(s)