Posts: 171
Threads: 10
Joined: May 2012
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.
Posts: 171
Threads: 10
Joined: May 2012
I've just added that, and it just gave me 26 errors.
Posts: 171
Threads: 10
Joined: May 2012
02.03.2013, 22:10
(
Последний раз редактировалось RedWingz; 02.03.2013 в 22:53.
)
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"
Posts: 171
Threads: 10
Joined: May 2012
Sorry for bumping this, But I really need help ;(
Posts: 171
Threads: 10
Joined: May 2012
It's in a seperate filterscript, It's not in my game mode...
And adding that just gives me another error...
![undecided](images/smilies/neutral.gif)
It's something to do with PlayerInfo
Posts: 1,861
Threads: 103
Joined: Sep 2011
Reputation:
0
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.
Posts: 171
Threads: 10
Joined: May 2012
Yea, I tried, But when It came to coverting to Dini.. I'm not that good.
Posts: 1,861
Threads: 103
Joined: Sep 2011
Reputation:
0
Then try creating the enum in the filterscript, it won't work without it, or you have to change the code..