(225) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
#1

I recieved this error upon decompling:


heres the code that the errors in:
Код:
forward LoadChar_data(playerid,name[],value[]);
public LoadChar_data(playerid,name[],value[])
{
    INI_String("Password",pInfo[playerid][Pass], 129);
    INI_Int("IP", pInfo[playerid][pIP]);
    INI_Int("Gender", pInfo[playerid][Gender]);
    INI_Int("Age", pInfo[playerid][Age]);
    INI_Int("Level", pInfo[playerid][Level]);
    INI_Int("pScore", pInfo[playerid][pScore]);
    INI_Int("pSkin", pInfo[playerid][pSkin]);
    INI_Int("Money", pInfo[playerid][Money]);
    INI_Int("pAdmin", pInfo[playerid][pAdmin]);
    INI_Int("pJob", pInfo[playerid][pJob]);
    INI_Int("WantedLevel", pInfo[playerid][WantedLevel]);
    INI_Float("X", pInfo[playerid][pX]);
    INI_Float("Y", pInfo[playerid][pY]);
    INI_Float("Z", pInfo[playerid][pZ]);
    INI_Int("Tutorial", pInfo[playerid][Tutorial]);
    INI_Int("Banned", pInfo[playerid][Banned]);
    INI_Int("VW", pInfo[playerid][VW]);
    INI_Int("Int", pInfo[playerid][Int]);
    INI_Int("Death", pInfo[playerid][pDeath]);
    INI_Float("Health", pInfo[playerid][Health]);
    INI_Float("Armour", pInfo[playerid][Armour]);
    INI_Int("Wep0", pInfo[playerid][pWeapon][0]);
    INI_Int("Wep0Ammo", pInfo[playerid][pWeaponAmmo][0]);
    INI_Int("Wep1", pInfo[playerid][pWeapon][1]);
    INI_Int("Wep1Ammo", pInfo[playerid][pWeaponAmmo][1]);
    INI_Int("Wep2", pInfo[playerid][pWeapon][2]);
    INI_Int("Wep2Ammo", pInfo[playerid][pWeaponAmmo][2]);
    INI_Int("Wep3", pInfo[playerid][pWeapon][3]);
    INI_Int("Wep3Ammo", pInfo[playerid][pWeaponAmmo][3]);
    INI_Int("Wep4", pInfo[playerid][pWeapon][4]);
    INI_Int("Wep4Ammo", pInfo[playerid][pWeaponAmmo][4]);
    INI_Int("Wep5", pInfo[playerid][pWeapon][5]);
    INI_Int("Wep5Ammo", pInfo[playerid][pWeaponAmmo][5]);
    INI_Int("Wep6", pInfo[playerid][pWeapon][6]);
    INI_Int("Wep6Ammo", pInfo[playerid][pWeaponAmmo][6]);
    INI_Int("Wep7", pInfo[playerid][pWeapon][7]);
    INI_Int("Wep7Ammo", pInfo[playerid][pWeaponAmmo][7]);
    INI_Int("Wep8", pInfo[playerid][pWeapon][8]);
    INI_Int("Wep8Ammo", pInfo[playerid][pWeaponAmmo][8]);
    INI_Int("Wep9", pInfo[playerid][pWeapon][9]);
    INI_Int("Wep9Ammo", pInfo[playerid][pWeaponAmmo][9]);
    INI_Int("Wep10", pInfo[playerid][pWeapon][10]);
    INI_Int("Wep10Ammo", pInfo[playerid][pWeaponAmmo][10]);
    INI_Int("Wep11", pInfo[playerid][pWeapon][11]);
    INI_Int("Wep11Ammo", pInfo[playerid][pWeaponAmmo][11]);
    INI_Int("Wep12", pInfo[playerid][pWeapon][12]);
    INI_Int("Wep12Ammo", pInfo[playerid][pWeaponAmmo][12]);
	return 1;
}
line 255
Код:
INI_String("Password",pInfo[playerid][Pass], 129);
enum
Код:
enum pInfo
{
	// Temp Values
	LoggedIn,
	Spawn,
	// Permanent Values
	pass[129],
	pIP,
	Gender,
	Age,
	Level,
	pScore,
	pSkin,
	Money,
	pAdmin,
	pJob,
	WantedLevel,
	Float:pX,
	Float:pY,
	Float:pZ,
	Tutorial,
	Banned,
	VW,
	Int,
	pDeath,
	Float:Health,
	Float:Armour,
	pWeapon[13],
	pWeaponAmmo[13],
	// Spawns //
	pHospital,
	pPrison,
 	pPrisonTime,
	//Prison//
	pPrisonBy[32],
	//Businesses//
	pBiz,
	pVBiz,
	pOwner,
	//Robbery Guage//
	RobTime,
    RobTimer,
    BankBalance,
    VehicleLicense,
    GettingLicense,
    PilotLicense,
    CP,
    CPs
}
new PlayerInfo[MAX_PLAYERS][pInfo];
Reply
#2

Which one of those lines is 255? Also, can you post your pInfo enum, as well?
Reply
#3

there its updated
Reply
#4

You're getting an error when using Pass. Correct? If you look at the enum, it's pass. See the difference?

So, make sure it says "pass" and it should compile.
Reply
#5

capitals lettes look at the enum it's pass but for the loadchar is Pass
edit: realcop got it before me.
Reply
#6

still get the error
Reply
#7

change pass[129], that my friend to pass[30],
Reply
#8

Quote:
Originally Posted by Aveger
Посмотреть сообщение
change pass[129], that my friend to pass[30],
Don't do that! What if he's hashing the passwords with Whirlpool?

Unless you have "new pass[129]" somewhere, you shouldn't still get the error...
Reply
#9

if I delete that whole line

INI_String("Password",pInfo[playerid][pass], 129);


I still get the error
Reply
#10

realcop i actually forgot about hashing, sorry, don't change that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)