Few errors - Please read
#1

pawn Код:
public OnPlayerSpawn(playerid)
{
    new filo[55];
    format(filo,55,"org%d.ini",Member[playerid]);
    SetPlayerColor(ID,HexToInt(dini_Get(filo,"Color")));
    return 1;
}
Errors:

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.
Reply
#2

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:
pawn Код:
new Member[MAX_PLAYERS];
Reply
#3

I've just added that, and it just gave me 26 errors.
Reply
#4

Here's the problem...

pawn Код:
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:
pawn Код:
if(PlayerInfo[playerid][pMember] = -255;
Main Error: error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo"
Reply
#5

Sorry for bumping this, But I really need help ;(
Reply
#6

Do you have the enum PlayerInfo in your mode?
something like this:

pawn Код:
enum PlayerInformation
{
Money,
Admin
}
new PlayerInfo[MAX_PLAYERS][PlayerInformation];
You should have something like that somewhere, if not, create it
Reply
#7

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
Reply
#8

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.
Reply
#9

Yea, I tried, But when It came to coverting to Dini.. I'm not that good.
Reply
#10

Then try creating the enum in the filterscript, it won't work without it, or you have to change the code..
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)