Y_INI Error - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Y_INI Error (
/showthread.php?tid=420016)
Y_INI Error -
RedWingz - 03.03.2013
Here is the code:
pawn Код:
public LoadUser_data(playerid, name[], value[])
{
INI_Int("Password",PlayerInfo[playerid][pPass]);
INI_Int("Kills",PlayerInfo[playerid][pKills]);
INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
INI_Int("Rank",PlayerInfo[playerid][pRank]);
INI_Int("AdminLevel",PlayerInfo[playerid][pAdminLevel]);
INI_Int("VipLevel",PlayerInfo[playerid][pVipLevel]);
INI_Int("Hour",PlayerInfo[playerid][pHours]);
INI_Int("Min",PlayerInfo[playerid][pMinutes]);
INI_Int("Sec",PlayerInfo[playerid][pSeconds]);
INI_Int("Factionid",PlayerData[playerid][Faction]);
INI_Int("Rank",PlayerData[playerid][Rank]);
INI_Int("ZombieClass",PlayerInfo[playerid][pZombieClass]);
INI_Int("IsPlayerInfected",PlayerInfo[playerid][IsPlayerInfected]);
INI_Int("HighJumpScout",aname[playerid][HighJumpScout]);
INI_Int("HighJumpZombie",aname[playerid][HighJumpZombie]);
INI_Int("StomperPushing",aname[playerid][StomperPushing]);
INI_Int("WitchAttack",aname[playerid][WitchAttack]);
INI_Int("ScreamerZombieAb",aname[playerid][ScreamerZombieAb]);
INI_Int("InfectionNormal",aname[playerid][InfectionNormal]);
INI_Int("InfectionMutated",aname[playerid][InfectionMutated]);
INI_Int("ShoutCooldown",aname[playerid][ShoutCooldown]);
INI_Int("ScreamerZombieAb2",aname[playerid][ScreamerZombieAb2]);
INI_Int("WitchAttack2",aname[playerid][WitchAttack2]);
INI_Int("InjectionFleshEater",aname[playerid][InjectionFleshEater]);
return 1;
}
The main error(s):
error 029: invalid expression, assumed zero
error 001: expected token: ";", but found "]"
error 028: invalid subscript (not an array or too many subscripts): "aname"
The lines that are the problems:
INI_Int("HighJumpScout",aname[playerid][HighJumpScout]);
This line has error 01 so usually it's the line above, which is this:
INI_Int("IsPlayerInfected",PlayerInfo[playerid][IsPlayerInfected]);
Can anyone help?
Thanks in advance
Re: Y_INI Error -
DiGiTaL_AnGeL - 03.03.2013
Show me the enums(I see you got 3 over there)
Re: Y_INI Error -
RedWingz - 03.03.2013
Here are the enums:
pawn Код:
enum pInfo
{
pPass,
pCash,
pAdminLevel,
pVipLevel,
pKills,
pDeaths,
pReported,
pWarnings,
pKicks,
pRank,
pMuted,
pTotalTime,
pConnectTime,
pHours,
pMinutes,
pSeconds,
pZombieClass,
IsPlayerInfected,
IsPlayerInfectedTimer
}
new PlayerInfo[MAX_PLAYERS][pInfo];
enum pData
{
Faction,
Rank
}
new PlayerData[MAX_PLAYERS][pData];
enum aname
{
HighJumpScout,
HighJumpZombie,
StomperPushing,
WitchAttack,
ScreamerZombieAb,
ScreamerZombieAb2,
InfectionNormal,
InfectionMutated,
ShoutCooldown,
HealCoolDown,
AdvancedMutatedCooldown,
WitchAttack2,
InfectionFleshEater
}
new Abilitys[MAX_PLAYERS][aname];
Re: Y_INI Error -
RedWingz - 03.03.2013
Problem Resolved.