error 033: array must be indexed (variable "inputtext")
#1

pawn Код:
if (dialogid == 2)
{
new pName[MAX_PLAYER_NAME], pUFile[50];
GetPlayerName(playerid, pName, sizeof(pName));
format(pUFile, sizeof(pUFile), SERVER_USER_FILES_FOLDER, pName);
if(!response)
{
Kick(playerid);
}
if (!strlen(inputtext))
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login", "Enter Your Password Below", "Login", "Cancel");
}
new tmp;
tmp = dini_Int(pUFile, "Password");
if(inputtext != tmp)//Line Error<<----------------------------
{
SendClientMessage(playerid, LOGINSYSTEMERROR_COLOR, "Wrong Password");
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login", "Enter Your Password Below", "Login", "Cancel");
}
else
{
IsPlayerLogged[playerid] = 1;
PlayerInfo[playerid][pAdminLevel] = dini_Int(pUFile, "AdminLevel");
SetPlayerScore(playerid, dini_Int(pUFile, "Level"));
SendClientMessage(playerid, LOGINSYSTEMERROR_COLOR, "[SYSTEM]: Successfully Logged In");
}
}
Advise Thanks
Reply
#2

Pawn does not support the comparison of strings by that method. You need to use the strcmp function, like so:

pawn Код:
if(strcmp(inputtext,tmp,true))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)