20.04.2013, 16:38
(
Последний раз редактировалось Bicentric; 21.03.2014 в 22:42.
)
So I decided to switch over to y_ini, but I am getting these compile errors:
And it's basically coming from whenever I want to load data from the 'ACSettings' INI file.
As you can see here, in the anti cheat enumeration it's all defined correctly with the boolean tags.
I think this may be due to the enumeration, because I can load strings perfectly fine to variables which aren't defined within an enumeration.
And that gives no errors. Any help is appreciated, thank you.
Код:
C:\Documents and Settings\User\My Documents\Dropbox\SA-MP Projects\Planet Of Transport\Server\gamemodes\planetoftransport.pwn(1736) : error 035: argument type mismatch (argument 2) C:\Documents and Settings\User\My Documents\Dropbox\SA-MP Projects\Planet Of Transport\Server\gamemodes\planetoftransport.pwn(1737) : error 035: argument type mismatch (argument 2) C:\Documents and Settings\User\My Documents\Dropbox\SA-MP Projects\Planet Of Transport\Server\gamemodes\planetoftransport.pwn(1738) : error 035: argument type mismatch (argument 2) C:\Documents and Settings\User\My Documents\Dropbox\SA-MP Projects\Planet Of Transport\Server\gamemodes\planetoftransport.pwn(1739) : error 035: argument type mismatch (argument 2) C:\Documents and Settings\User\My Documents\Dropbox\SA-MP Projects\Planet Of Transport\Server\gamemodes\planetoftransport.pwn(1740) : error 035: argument type mismatch (argument 2) C:\Documents and Settings\User\My Documents\Dropbox\SA-MP Projects\Planet Of Transport\Server\gamemodes\planetoftransport.pwn(1741) : error 035: argument type mismatch (argument 2) C:\Documents and Settings\User\My Documents\Dropbox\SA-MP Projects\Planet Of Transport\Server\gamemodes\planetoftransport.pwn(1742) : error 035: argument type mismatch (argument 2) C:\Documents and Settings\User\My Documents\Dropbox\SA-MP Projects\Planet Of Transport\Server\gamemodes\planetoftransport.pwn(1743) : error 035: argument type mismatch (argument 2) C:\Documents and Settings\User\My Documents\Dropbox\SA-MP Projects\Planet Of Transport\Server\gamemodes\planetoftransport.pwn(1744) : error 035: argument type mismatch (argument 2) C:\Documents and Settings\User\My Documents\Dropbox\SA-MP Projects\Planet Of Transport\Server\gamemodes\planetoftransport.pwn(1745) : error 035: argument type mismatch (argument 2) C:\Documents and Settings\User\My Documents\Dropbox\SA-MP Projects\Planet Of Transport\Server\gamemodes\planetoftransport.pwn(1746) : error 035: argument type mismatch (argument 2) C:\Documents and Settings\User\My Documents\Dropbox\SA-MP Projects\Planet Of Transport\Server\gamemodes\planetoftransport.pwn(1747) : error 035: argument type mismatch (argument 2) C:\Documents and Settings\User\My Documents\Dropbox\SA-MP Projects\Planet Of Transport\Server\gamemodes\planetoftransport.pwn(1748) : error 035: argument type mismatch (argument 2) C:\Documents and Settings\User\My Documents\Dropbox\SA-MP Projects\Planet Of Transport\Server\gamemodes\planetoftransport.pwn(1749) : error 035: argument type mismatch (argument 2) C:\Documents and Settings\User\My Documents\Dropbox\SA-MP Projects\Planet Of Transport\Server\gamemodes\planetoftransport.pwn(1750) : error 035: argument type mismatch (argument 2) C:\Documents and Settings\User\My Documents\Dropbox\SA-MP Projects\Planet Of Transport\Server\gamemodes\planetoftransport.pwn(1751) : error 035: argument type mismatch (argument 2) C:\Documents and Settings\User\My Documents\Dropbox\SA-MP Projects\Planet Of Transport\Server\gamemodes\planetoftransport.pwn(1752) : error 035: argument type mismatch (argument 2) C:\Documents and Settings\User\My Documents\Dropbox\SA-MP Projects\Planet Of Transport\Server\gamemodes\planetoftransport.pwn(1753) : error 035: argument type mismatch (argument 2) C:\Documents and Settings\User\My Documents\Dropbox\SA-MP Projects\Planet Of Transport\Server\gamemodes\planetoftransport.pwn(1754) : error 035: argument type mismatch (argument 2) C:\Documents and Settings\User\My Documents\Dropbox\SA-MP Projects\Planet Of Transport\Server\gamemodes\planetoftransport.pwn(1755) : error 035: argument type mismatch (argument 2) C:\Documents and Settings\User\My Documents\Dropbox\SA-MP Projects\Planet Of Transport\Server\gamemodes\planetoftransport.pwn(4341) : warning 203: symbol is never used: "carNames" C:\Documents and Settings\User\My Documents\Dropbox\SA-MP Projects\Planet Of Transport\Server\gamemodes\planetoftransport.pwn(4341) : warning 203: symbol is never used: "mapZones" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 20 Errors. [Finished in 7.7s with exit code 1]
pawn Код:
INI:ACSettings[](name, value[])
{
INI_Bool("PingKick", AntiCheatData[PingKick]);
INI_Int("PingLimit", AntiCheatData[PingLimit]);
INI_Int("PingWarnLimit", AntiCheatData[PingWarnLimit]);
INI_Bool("Spam", AntiCheatData[Spam]);
INI_Int("SpamLimit", AntiCheatData[SpamLimit]);
INI_Bool("JetpackHack", AntiCheatData[JetpackHack]);
INI_Bool("WeaponHack", AntiCheatData[WeaponHack]);
INI_Bool("TeleportHack", AntiCheatData[TeleportHack]);
INI_Bool("HealthHack", AntiCheatData[HealthHack]);
INI_Bool("SpeedHack", AntiCheatData[SpeedHack]);
INI_Bool("ScoreHack", AntiCheatData[ScoreHack]);
INI_Bool("MoneyHack", AntiCheatData[MoneyHack]);
INI_Bool("FakekillHack", AntiCheatData[FakekillHack]);
INI_Bool("CarWarpHack", AntiCheatData[CarWarpHack]);
INI_Bool("CarSwingHack", AntiCheatData[CarSwingHack]);
INI_Bool("CarParticleSpamHack", AntiCheatData[CarParticleSpamHack]);
INI_Int("AdminIgnoreLevel", AntiCheatData[AdminIgnoreLevel]);
INI_Int("BanDays", AntiCheatData[BanDays]);
INI_Int("WarnToBan", AntiCheatData[WarnToBan]);
INI_Int("WarnBanDays", AntiCheatData[WarnBanDays]);
return 0;
}
pawn Код:
enum _antiCheatData
{
bool:PingKick,
PingLimit,
PingWarnLimit,
bool:Spam,
SpamLimit,
bool:JetpackHack,
bool:WeaponHack,
bool:TeleportHack,
bool:HealthHack,
bool:SpeedHack,
bool:ScoreHack,
bool:MoneyHack,
bool:FakekillHack,
bool:CarWarpHack,
bool:CarSwingHack,
bool:CarParticleSpamHack,
AdminIgnoreLevel,
BanDays,
WarnToBan,
WarnBanDays,
};
new AntiCheatData[_antiCheatData];
pawn Код:
new
MessageOfTheDay[128],
MessageOfTheDayAuthor[MAX_PLAYER_NAME];
pawn Код:
INI:MOTD[](name[], value[])
{
INI_String("MessageOfTheDay", MessageOfTheDay, sizeof(MessageOfTheDay));
INI_String("MessageOfTheDayAuthor", MessageOfTheDayAuthor, sizeof(MessageOfTheDayAuthor));
return 0;
}