C:\Users\Death\Desktop\SA-MP custom script\BD-RP\gamemodes\myscript.pwn(4211) : error 001: expected token: "-string end-", but found "-identifier-" C:\Users\Death\Desktop\SA-MP custom script\BD-RP\gamemodes\myscript.pwn(4211) : warning 215: expression has no effect C:\Users\Death\Desktop\SA-MP custom script\BD-RP\gamemodes\myscript.pwn(4211) : error 001: expected token: ";", but found "]" C:\Users\Death\Desktop\SA-MP custom script\BD-RP\gamemodes\myscript.pwn(4211) : error 029: invalid expression, assumed zero C:\Users\Death\Desktop\SA-MP custom script\BD-RP\gamemodes\myscript.pwn(4211) : fatal error 107: too many error messages on one line
enum pInfo
{
pColor,
pAccent[70]
}
new PlayerInfo[MAX_PLAYERS][pInfo];// Stores the player data
//This is were the error occurs below on 'PlayerInfo[playerid][pAccent]
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Color",PlayerInfo[playerid][pColor]);
INI_String("Accent",PlayerInfo[playerid][pAccent], sizeof(PlayerInfo[playerid][pAccent]));//Error line. :(
return 1;
}
new pAccent[70];
public LoadUser_data(playerid, name[], value[])
{
INI_String("Accent",pAccent, sizeof(pAccent));
return 1;
}
INI_String("Accent",PlayerInfo[playerid][pAccent], 70);
enum pInfo
{
pColor,
pAccent[70]
}
new PlayerInfo[MAX_PLAYERS][pInfo];
printf("%i", sizeof(PlayerInfo[0][pAccent]));
C:\Users\Death\Desktop\SA-MP custom script\BD-RP\gamemodes\myscript.pwn(4211) : error 001: expected token: "-string end-", but found "-identifier-" C:\Users\Death\Desktop\SA-MP custom script\BD-RP\gamemodes\myscript.pwn(4211) : warning 215: expression has no effect C:\Users\Death\Desktop\SA-MP custom script\BD-RP\gamemodes\myscript.pwn(4211) : error 001: expected token: ";", but found "]" C:\Users\Death\Desktop\SA-MP custom script\BD-RP\gamemodes\myscript.pwn(4211) : error 029: invalid expression, assumed zero C:\Users\Death\Desktop\SA-MP custom script\BD-RP\gamemodes\myscript.pwn(4211) : fatal error 107: too many error messages on one line
INI_String("Accent",PlayerInfo[playerid][pAccent], 70);
PlayerInfo[playerid][pAccent]
new accent;
INI_String("Accent",accent, 70);//Works but won't load my players data ofc.
INI_String("Accent",PlayerInfo[playerid][pAccent], 70); // Yet this doesn't, though PlayerInfo is were my players data is stored
INI_Int("Color",PlayerInfo[playerid][pColor]);// Yet, this works fine? This has confused me a LOT
enum pInfo
{
pAccent[50]
return 1;
}
PlayerInfo[playerid][pInfo];
//Then did
INI_String("Accent",PlayerInfo[playerid][pAccent], 70);
enum pInfo { pColor, pAccent[70] } new PlayerInfo[MAX_PLAYERS][pInfo];// Stores the player data //This is were the error occurs below on 'PlayerInfo[playerid][pAccent] public LoadUser_data(playerid,name[],value[]) { INI_Int("Color",PlayerInfo[playerid][pColor]); INI_String("Accent",PlayerInfo[playerid][pAccent], 70); return 1; }
You are doing it wrong i think?Try like this:
Код:
enum pInfo { pColor, pAccent[70] } new PlayerInfo[MAX_PLAYERS][pInfo];// Stores the player data //This is were the error occurs below on 'PlayerInfo[playerid][pAccent] public LoadUser_data(playerid,name[],value[]) { INI_Int("Color",PlayerInfo[playerid][pColor]); INI_String("Accent",PlayerInfo[playerid][pAccent], 70); return 1; } |