27.03.2014, 16:46
I've been trying to fix the Auto-Login script, but i always get the same error:
Code:
I've been trying to do stuff like plrIP[playerid], plrIP[16], plrIP[playerid][16] etc., but i still get the error.
Any ideas of how to fix it?
Код:
error 033: array must be indexed (variable "plrIP")
pawn Код:
new plrIP[16];
GetPlayerIp(playerid, plrIP, sizeof(plrIP));
if(PlayerInfo[playerid][pACBanned] == 0 && PlayerInfo[playerid][pBanned] == 0)
{
if(PlayerInfo[playerid][pIP] == plrIP) //This is the error line!
{
SendClientMessage(playerid, -1, "{FFFFFF}* {00C0FF}You've been Auto Logged-In by the server!");
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
GivePlayerCash(playerid, PlayerInfo[playerid][pCash]);
SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
PlayerInfo[playerid][pLoggedIn] = 1;
SendClientMessage(playerid, -1, "{FFFFFF}* {00C0FF}Stats initialized successfully!");
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","Type your password below to login.","Login","Quit");
}
}
Any ideas of how to fix it?