SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 08/03/2009, 11:20 PM   #1
introzen
Gangsta
 
introzen's Avatar
 
Join Date: Aug 2008
Posts: 788
Reputation: 34
Default error 033: array must be indexed (variable "dini_Get")

pawn Code:
dcmd_login(playerid,params[])
    {
    new pName[MAX_PLAYER_NAME], string[256],skin;
      GetPlayerName(playerid,pName,sizeof(pName));
      format(string,sizeof(string),"EQRP/Players/%s.ini",pName);
      if(PlayerInfo[playerid][pLogged] == 1) return SendClientMessage(playerid,COLOR_DARKRED,"Already Logged In");
      if(params[0] == 0) return SendClientMessage(playerid,COLOR_DARKRED,"USAGE: /login [password]");
      if(!dini_Exists(string)) return SendClientMessage(playerid,COLOR_DARKRED,"Not registered, use /register [password]");
      if(dini_Get(string,"Password") != params[0]) return SendClientMessage(playerid,COLOR_DARKRED,"Wrong Password");   // LINE 985
      PlayerInfo[playerid][pLogged] = 1;
      SendClientMessage(playerid,COLOR_LIGHTBLUE,"Logged In and Spawned");
      skin = dini_Int(string,"Skin");
      GivePlayerMoney(playerid,dini_Int(string,"Money"));
        SpawnPlayer(playerid);
        SetPlayerSkin(playerid,skin);
        GivePlayerWeapon(playerid,dini_Int(string,"Weapon"),dini_Int(string,"Ammo"));
      return 1;
    }

Code:
C:\Documents and Settings\HP_Ägaren\Skrivbord\SAMP\samp server\gamemodes\EQRP.pwn(985) : error 033: array must be indexed (variable "dini_Get")
Can anyone help me please?
__________________
"No problem can be solved from the same level of consciousness that created it." - Albert Einstein
introzen is offline  
Old 08/03/2009, 11:28 PM   #2
Jefff
Banned
 
Join Date: Dec 2007
Posts: 2,593
Reputation: 326
Default Re: error 033: array must be indexed (variable "dini_Get")

Try maybe this
Code:
dcmd_login(playerid,params[])
	{
    new pName[MAX_PLAYER_NAME], string[256],tmp[256],skin;
	  GetPlayerName(playerid,pName,sizeof(pName));
	  format(string,sizeof(string),"EQRP/Players/%s.ini",pName);
		tmp = dini_Get(string,"Password");
	  if(PlayerInfo[playerid][pLogged] == 1) return SendClientMessage(playerid,COLOR_DARKRED,"Already Logged In");
	  if(params[0] == 0) return SendClientMessage(playerid,COLOR_DARKRED,"USAGE: /login [password]");
	  if(!dini_Exists(string)) return SendClientMessage(playerid,COLOR_DARKRED,"Not registered, use /register [password]");
	  if(tmp != params[0]) return SendClientMessage(playerid,COLOR_DARKRED,"Wrong Password");  // LINE 985
	  PlayerInfo[playerid][pLogged] = 1;
	  SendClientMessage(playerid,COLOR_LIGHTBLUE,"Logged In and Spawned");
	  skin = dini_Int(string,"Skin");
	  GivePlayerMoney(playerid,dini_Int(string,"Money"));
		SpawnPlayer(playerid);
		SetPlayerSkin(playerid,skin);
		GivePlayerWeapon(playerid,dini_Int(string,"Weapon"),dini_Int(string,"Ammo"));
	  return 1;
	}
Jefff is offline  
Old 08/03/2009, 11:38 PM   #3
introzen
Gangsta
 
introzen's Avatar
 
Join Date: Aug 2008
Posts: 788
Reputation: 34
Default Re: error 033: array must be indexed (variable "dini_Get")

didn't work...
__________________
"No problem can be solved from the same level of consciousness that created it." - Albert Einstein
introzen is offline  
Old 09/03/2009, 06:55 AM   #4
introzen
Gangsta
 
introzen's Avatar
 
Join Date: Aug 2008
Posts: 788
Reputation: 34
Default Re: error 033: array must be indexed (variable "dini_Get")

Can someone help me please? sry for double post.
__________________
"No problem can be solved from the same level of consciousness that created it." - Albert Einstein
introzen is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Checkpoint & error 033: array must be indexed (variable "tmp") KyleOwnzYou Help Archive 2 08/05/2010 04:10 AM
error 033: array must be indexed (variable "Address") Kyle Help Archive 1 15/02/2010 11:59 PM
[Help]error 033: array must be indexed (variable "teleport") borisblat Help Archive 1 13/10/2009 02:51 PM
error 033: array must be indexed (variable "cheaterr") Dj_maryo1993 Help Archive 2 29/07/2009 11:38 AM


All times are GMT. The time now is 12:15 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.