17.12.2011, 17:00
I know I'm doing something stupid somewhere.
I've commented the lines what have there error's with "ERROR".
Here is my 'ServerData' enum.
And here are my error's/warnings.
Please only take note of the first three.
I've commented the lines what have there error's with "ERROR".
pawn Код:
public OnGameModeInit()
{
//////////////////////////////////////////////////////////////////
CheatTimer = SetTimer("AntiCheat", 100, true);
MultiTimerSystem = SetTimer("MultiTimer", 1000, true), MsgSecs = 0, WeatherSecs = 0, LottoSecs = 0;
//////////////////////////////////////////////////////////////////
if(!DOF2_FileExists(ConfigFile))
{
print("WARNING! File: 'Config' is missing! Creating it now.");
DOF2_CreateFile(ConfigFile);
DOF2_SetString(ConfigFile, "MOTD", "No message of the day.");
DOF2_SetBool(ConfigFile, "ConnectMessages", true);
DOF2_SetBool(ConfigFile, "IsLottoOnline", true);
DOF2_SetInt(ConfigFile, "MinLottoPlayers", 1);
DOF2_SetInt(ConfigFile, "MinLottoWin", 100000);
DOF2_SetInt(ConfigFile, "MaxLottoWin", 300000);
DOF2_SetBool(ConfigFile, "SavePosOnCrash", false);
DOF2_SaveFile();
}
if(!DOF2_FileExists(AntiCheatFile))
{
print("WARNING! File: 'AntiCheat' is missing! Creating it now.");
DOF2_CreateFile(AntiCheatFile);
DOF2_SetBool(AntiCheatFile, "Activated", true);
DOF2_SetInt(AntiCheatFile, "PingLimit", 500);
DOF2_SetBool(AntiCheatFile, "PingKick", true);
DOF2_SetBool(AntiCheatFile, "WeaponHack", true);
DOF2_SetBool(AntiCheatFile, "MoneyHack", true);
DOF2_SetBool(AntiCheatFile, "TeleportHack", true);
DOF2_SetBool(AntiCheatFile, "JetpackHack", true);
DOF2_SetBool(AntiCheatFile, "HealthHack", true);
DOF2_SetBool(AntiCheatFile, "ArmourHack", true);
DOF2_SaveFile();
}
//////////////////////////////////////////////////////////////////
print("Loading server data!");
format(ServerData[MOTD], sizeof(ServerData[MOTD]), "%s", DOF2_GetString(ConfigFile, "MOTD")), printf("MOTD: %s", DOF2_GetString(ConfigFile, "MOTD"));
ServerData[ConnectMessages] = DOF2_GetBool(ConfigFile, "ConnectMessages"), printf("Connect messages: %d", DOF2_GetBool(ConfigFile, "ConnectMessages"));
ServerData[IsLottoOnline] = DOF2_GetBool(ConfigFile, "IsLottoOnline"), printf("Lottery online: %d", DOF2_GetBool(ConfigFile, "IsLottoOnline"));
ServerData[MinLottoPlayers] = DOF2_GetInt(ConfigFile, "MinLottoPlayers"), printf("Lottery min players: %d", DOF2_GetInt(ConfigFile, "MinLottoPlayers")); //ERROR
ServerData[MinLottoWin] = DOF2_GetInt(ConfigFile, "MinLottoWin"), printf("Lottery min win: %d", DOF2_GetInt(ConfigFile, "MinLottoWin")); //ERROR
ServerData[MaxLottoWin] = DOF2_GetInt(ConfigFile, "MaxLottonWin"), printf("Lottery max win: %d", DOF2_GetInt(ConfigFile, "MaxLottonWin")); //ERROR
ServerData[SavePosOnCrash] = DOF2_GetBool(ConfigFile, "SavePosOnCrash"), printf("Save posistion on crash: %d", DOF2_GetBool(ConfigFile, "SavePosOnCrash"));
return 1;
}
pawn Код:
enum sData
{
//////////////////////////////////////////////////////////////////
MOTD[256], //It could be a big message, so that's why I used a 256 string size.
bool:ConnectMessages,
//////////////////////////////////////////////////////////////////
bool:IsLottoOnline, //On or off
int:MinLottoPlayers,
int:MinLottoWin,
int:MaxLottoWin,
//////////////////////////////////////////////////////////////////
bool:SavePosOnCrash,
}
Код:
C:\Users\Family\Desktop\SA-MP Highway Trucking\Server\gamemodes\HighwayTrucking.pwn(218) : warning 213: tag mismatch C:\Users\Family\Desktop\SA-MP Highway Trucking\Server\gamemodes\HighwayTrucking.pwn(219) : warning 213: tag mismatch C:\Users\Family\Desktop\SA-MP Highway Trucking\Server\gamemodes\HighwayTrucking.pwn(220) : warning 213: tag mismatch C:\Users\Family\Desktop\SA-MP Highway Trucking\Server\gamemodes\HighwayTrucking.pwn(536) : warning 203: symbol is never used: "AntiCheat" C:\Users\Family\Desktop\SA-MP Highway Trucking\Server\gamemodes\HighwayTrucking.pwn(233) : warning 204: symbol is assigned a value that is never used: "LottoSecs" C:\Users\Family\Desktop\SA-MP Highway Trucking\Server\gamemodes\HighwayTrucking.pwn(233) : warning 204: symbol is assigned a value that is never used: "MsgSecs" C:\Users\Family\Desktop\SA-MP Highway Trucking\Server\gamemodes\HighwayTrucking.pwn(233 -- 536) : warning 203: symbol is never used: "PlayerInfo" C:\Users\Family\Desktop\SA-MP Highway Trucking\Server\gamemodes\HighwayTrucking.pwn(233 -- 536) : warning 203: symbol is never used: "PlayerLogged" C:\Users\Family\Desktop\SA-MP Highway Trucking\Server\gamemodes\HighwayTrucking.pwn(233) : warning 204: symbol is assigned a value that is never used: "WeatherSecs" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 9 Warnings.