Problem with dini_Get("file", variable);
#6

Hey, i got a problem again.

Now i can't check if the password that the player is writing is the same that is in the file:

Код:
if(strcmp(cmd, "/login", true) == 0)
	{
	GetPlayerName(playerid, name, sizeof(name));
	format(file, sizeof(file), "/users/%s.save", udb_encode(name));
	if(!dini_Exists(file))
		{
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "SERVER: Account does not exist, register with /register.");
		return 1;
		}
	else if(dini_Exists(file))
 		{
 		tmp=strtok(cmdtext, idx);
		if(dini_Int(file,"login")==1)
			{
			SendClientMessage(playerid, COLOR_LIGHTBLUE, "SERVER: You are already logged in.");
			return 1;
			}
		if(!strlen(tmp))
			{
			SendClientMessage(playerid, COLOR_LIGHTBLUE, "SERVER: You did not write a password.");
			return 1;
			}
		else if(strlen(tmp))
		  {
		  if(dini_Get(file,"password")!=tmp)
		  	{
		  	SendClientMessage(playerid, COLOR_LIGHTBLUE, "SERVER: Incorrect password.");
		  	}
          else if(dini_Get(file,"password")==tmp)
		  	{
            dini_Int(file,"login",1);
		  	SendClientMessage(playerid, COLOR_LIGHTBLUE, "SERVER: You are now logged in.");
		  	}
I get error on these:

Код:
if(dini_Get(file,"password")!=tmp)
Код:
if(dini_Get(file,"password")==tmp)
Код:
error 033: array must be indexed (variable "dini_Get")
Код:
error 033: array must be indexed (variable "dini_Get")
Reply


Messages In This Thread
Problem with dini_Get("file", variable); - by ronyx69 - 27.07.2009, 13:46
Re: Problem with dini_Get("file", variable); - by paytas - 27.07.2009, 13:52
Re: Problem with dini_Get("file", variable); - by ronyx69 - 27.07.2009, 13:58
Re: Problem with dini_Get("file", variable); - by paytas - 27.07.2009, 14:01
Re: Problem with dini_Get("file", variable); - by ronyx69 - 27.07.2009, 14:07
Re: Problem with dini_Get("file", variable); - by ronyx69 - 27.07.2009, 16:07
Re: Problem with dini_Get("file", variable); - by yezizhu - 27.07.2009, 16:16
Re: Problem with dini_Get("file", variable); - by DracoBlue - 27.07.2009, 16:20
Re: Problem with dini_Get("file", variable); - by ronyx69 - 27.07.2009, 16:22
Re: Problem with dini_Get("file", variable); - by DracoBlue - 27.07.2009, 16:25

Forum Jump:


Users browsing this thread: 1 Guest(s)