#1

Код:
C:\Documents and Settings\samp\Desktop\Roleplay.pwn(44) : error 032: array index out of bounds (variable "AccountInfo")
line 44

Код:
if (AccountInfo[playerid][aInfo] == 0)
Reply
#2

I think you're trying to acess a enumeration, I dunno, I'm not psych, you could show your code to us (:
Reply
#3

More code please.
Reply
#4

Quote:
Originally Posted by Hot
I think you're trying to acess a enumeration, I dunno, I'm not psych, you could show your code to us (:
Quote:
Originally Posted by [N
BL!nk ]
More code please.
More Code Please xD
Reply
#5

Код:
public OnPlayerConnect(playerid)
{
  new str1[128],file[128];
  new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, sizeof(name));
	format(file,sizeof(file),"/KA/%s.ini",name);
	if (AccountInfo[playerid][aInfo] == 0) ---------------------> error line***************************
	{
	  if (!fexist(str1))
	  {
	    new stri[128];
	  	format(stri,256,"Welcome %s to Kljukec's Roleplay Server.\n\nYour name is not registered yet so please enter \nthe password in box! ",name);
			ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Register",stri,"Register","Quit");
		}
		else if (fexist(str1))
		{
		  new strn[128];
			format(strn,256,"Welcome back %s\n\nPlease enter the correct password.",name);
			ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login",strn,"Login","Quit");
		}
	}
	return 1;
}
Reply
#6

...
Reply
#7

Quote:
Originally Posted by MrLeNy
...
so any help ?
Reply
#8

Try this

if (AccountInfo[playerid][aInfo] = 0;

Reply
#9

I'm pretty sure you're not using the guts of the enumeration, and just using the enum variable. A example of this is.

pawn Код:
enum aInfo { // Using ainfo instead of using the guts of the enumeration
  SpawnPos[4] // This is the guts.
}
new AccountInfo[MAX_PLAYERS][aInfo];
Reply
#10

this is my enum

Код:
enum aInfo{

	aPassword,
	aLogged,
	aRegistered,
	aWrongpass,
}
new AccountInfo[MAX_PLAYERS][aInfo];
i change and i add [128] as u did but still same error,any help ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)