29.03.2010, 21:19
Код:
C:\Documents and Settings\samp\Desktop\Roleplay.pwn(44) : error 032: array index out of bounds (variable "AccountInfo")
Код:
if (AccountInfo[playerid][aInfo] == 0)
C:\Documents and Settings\samp\Desktop\Roleplay.pwn(44) : error 032: array index out of bounds (variable "AccountInfo")
if (AccountInfo[playerid][aInfo] == 0)
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 (:
|
Originally Posted by [N
BL!nk ]
More code please. |
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; }
Originally Posted by MrLeNy
...
|
enum aInfo { // Using ainfo instead of using the guts of the enumeration
SpawnPos[4] // This is the guts.
}
new AccountInfo[MAX_PLAYERS][aInfo];
enum aInfo{ aPassword, aLogged, aRegistered, aWrongpass, } new AccountInfo[MAX_PLAYERS][aInfo];