View Full Version : Few errors - Please read

02/03/2013, 09:00 PM
public OnPlayerSpawn(playerid)
new filo[55];
return 1;


error 028: invalid subscript (not an array or too many subscripts): "Member"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

Any help? Thanks.

02/03/2013, 09:35 PM
It seems that the error is once again, quite quite quite straightforward - your declaration of the "Member" array does not conform to how you wish to use it.

Please show how it is declared. It should be an array like this:
new Member[MAX_PLAYERS];

02/03/2013, 09:54 PM
I've just added that, and it just gave me 26 errors. :|

02/03/2013, 10:10 PM
Here's the problem...

public OnPlayerConnect(playerid)
if(PlayerInfo[playerid][pMember] = -255;
if(PlayerInfo[playerid][pLeader] = 0;
request[playerid] = -255;
format(file, sizeof(file), "%s.ini",GetPlayerName(playerid,name,sizeof(name)));
if(PlayerInfo[playerid][pMember] = dini_Int(file,"Member"); //Get saved file
if(PlayerInfo[playerid][pLeader] = dini_Int(file,"Leader"); //Get saved file
return 1;

This is the line that's giving the 3-5 errors: if(PlayerInfo[playerid][pMember] = -255;

Main Error: error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo"

02/03/2013, 11:32 PM
Sorry for bumping this, But I really need help ;(

02/03/2013, 11:39 PM
Do you have the enum PlayerInfo in your mode?
something like this:

enum PlayerInformation
new PlayerInfo[MAX_PLAYERS][PlayerInformation];

You should have something like that somewhere, if not, create it

02/03/2013, 11:43 PM
It's in a seperate filterscript, It's not in my game mode...
And adding that just gives me another error... :|
It's something to do with PlayerInfo

02/03/2013, 11:46 PM
You can't use the PlayerInfo stuff outside of your gamemode, unless you make a function to exchange those values cross script.
Isn't there any way you can do this in your gamemode? These things should compile fine in your gamemode, if you have the enum.

02/03/2013, 11:47 PM
Yea, I tried, But when It came to coverting to Dini.. I'm not that good.

03/03/2013, 12:01 AM
Then try creating the enum in the filterscript, it won't work without it, or you have to change the code..