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

Code:
C:\Users\Lalika\Downloads\Szero\Szerу\gamemodes\Matyi.pwn(3499) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
C:\Users\Lalika\Downloads\Szero\Szerу\gamemodes\Matyi.pwn(3499) : warning 215: expression has no effect
C:\Users\Lalika\Downloads\Szero\Szerу\gamemodes\Matyi.pwn(3499) : error 001: expected token: ";", but found "]"
C:\Users\Lalika\Downloads\Szero\Szerу\gamemodes\Matyi.pwn(3499) : error 029: invalid expression, assumed zero
C:\Users\Lalika\Downloads\Szero\Szerу\gamemodes\Matyi.pwn(3499) : fatal error 107: too many error messages on one line
help please!

Code:
pInfo[playerid][Penz]
<<ERROR

Code:
enum pInfo
{
	Admin,
	Munka,
	pSkin,
	Float:pX,
	Float:pY,
	Float:pZ,
	Float:pA,
	admin2,
	askin,
	Penz, <<<money
	Ehseg,
	Frakcio,
	Jogsi,
	Kaja,
	Fegyver,
	Leader
	
}
new PlayerInfo[MAX_PLAYERS][pInfo];
bank system,not good for the money script ,
Reply
#2

try this
PHP Code:
enum pInfo
{
    
Admin,
    
Munka,
    
pSkin,
    
Float:pX,
    
Float:pY,
    
Float:pZ,
    
Float:pA,
    
admin2,
    
askin,
    
Penz, <<<money
    Ehseg,
    Frakcio,
    Jogsi,
    Kaja,
    Fegyver,
    Leader
    
};
new PlayerInfo[MAX_PLAYERS][pInfo]; 
Reply
#3

Quote:
Originally Posted by sl!x
View Post
try this
PHP Code:
enum pInfo
{
    
Admin,
    
Munka,
    
pSkin,
    
Float:pX,
    
Float:pY,
    
Float:pZ,
    
Float:pA,
    
admin2,
    
askin,
    
Penz, <<<money
    Ehseg,
    Frakcio,
    Jogsi,
    Kaja,
    Fegyver,
    Leader
    
};
new PlayerInfo[MAX_PLAYERS][pInfo]; 
don't work!
Reply
#4

It should be:
pawn Code:
PlayerInfo[playerid][Penz]
Reply
#5

One code:
Code:
	new file[100],Name[MAX_PLAYER_NAME]; GetPlayerName(playerid,Name,sizeof(Name)); format(file,sizeof(file),PlayerFile,Name);
	if(!dini_Exists(file)) {
		dini_Create(file);
		dini_IntSet(file,"Penz",pInfo[playerid][Penz]);
	}
 	else if(dini_Exists(file))
	{
	pInfo[playerid][Penz] = dini_Int(file,"Penz");
	}
    return 1;
}
there is even more than that is the same error
Reply
#6

If the whole script uses pInfo as the name of the array, then swap them.
pawn Code:
enum PlayerInfo
{
    ...
};
new pInfo[MAX_PLAYERS][pInfo];
else.. you have to change them all.
Reply
#7

Quote:
Originally Posted by Konstantinos
View Post
If the whole script uses pInfo as the name of the array, then swap them.
pawn Code:
enum PlayerInfo
{
    ...
};
new pInfo[MAX_PLAYERS][pInfo];
else.. you have to change them all.
Can you give an example please?
Reply
#8

Quote:
Originally Posted by Slicebook
View Post
Can you give an example please?
Of what?
Reply
#9

Replace pInfo in that error line with PlayerInfo
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)