Small Error, Need Help
#1

ive never run into this error before, but here it is
Код:
***\*******\*******\*******\****.pwn(100) : error 033: array must be indexed (variable "dini_Get")
My Code Is *start of it*
Код:
COMMAND:alogin(playerid, params[])
{
if(!params[0]) return SendClientMessage(playerid, red, "Command Syntax /alogin [password]");
if(Logged[playerid] == 1) return SendClientMessage(playerid, red, "You Are Already Registered And Logged In!");
GetPlayerIp(playerid, pIP, sizeof(pIP));
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), USERFILES_PATH, pname);
if(!dini_Exists(file)) return SendClientMessage(playerid, red, "This Account Is Not Registered /aregister to register!");
/* 100 */ if(params[0] == dini_Get(file, "Password"))
{
Reply
#2

You're assuming he players password is an integer, when it is actually a string.
To compare strings, use strcmp
to obtain a string from dini, use dini's GetString function (I don't really know what it's called because I think dini is inefficient and don't use it)
Reply
#3

Wow, im an idiot, thanks i tried that before and musta had something wrong before! Thanks Joe
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)