08.11.2014, 06:17
I get the error when i compile as the title said.
This is the code, and i put it below OnGameModeInit();
The whole GM:
This is the code, and i put it below OnGameModeInit();
pawn Код:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_String("Pass", pInfo[playerid][pPass]); // This
INI_String("IP", pInfo[playerid][pIP]); // And this
INI_Int("Money", pInfo[playerid][pMoney]);
INI_Int("Score", pInfo[playerid][pScore]);
INI_Int("Kills", pInfo[playerid][pKills]);
INI_Int("Deaths", pInfo[playerid][pDeaths]);
INI_Int("Level", pInfo[playerid][pLevel]);
INI_Int("VIP", pInfo[playerid][pVIP]);
return 1;
}
pawn Код:
#include <a_samp>
#include <YSI\y_ini>
#include <YSI\y_commands>
#include <sscanf2>
#include <foreach>
#include <streamer>
#define LIGHTGREEN 0x38FF06FF
#define LIGHTBLUE2 0xF6BB0AA
#define LIGHTBLUE 0x0BBF6AA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_PURPLE 0x800080AA
#define COLOR_BLACK 0x000000AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_GREEN1 0x33AA33AA
#define COLOR_BROWN 0xA52A2AAA
#define blue 0x375FFFFF
#define BlueMsg 0x0BBF6AA
#define white 0xFFFFFFAA
#define red 0xFF0000AA
#define lightred 0xFB0000AA
#define green 0x33FF33AA
#define yellow 0xFFFF00AA
#define grey 0xC0C0C0AA
#define Green1 0x129E12FF
#define Green2 0x53D212FF
#define blue1 0x2641FEAA
#define orange 0xFF9900AA
#define black 0x2C2727AA
#define TEAM_NONE 0
#define TEAM_ARMY 1
#define TEAM_TERR 2
#define DIALOGID 1337
#define PATH "Accounts/%s.user"
#define PUBLIC:%1(%2) forward %1(%2); public %1(%2)
#define MAX_LOGIN_FAIL 3
enum PlayerInfo {
bool:pLoggedIn,
pPass[129],
pLoginFails,
pIP[24],
pMoney,
pScore,
pKills,
pDeaths,
pLevel,
pVIP,
pMember,
pMuted,
pMuteTime,
pFrozen,
};
new pInfo[MAX_PLAYERS][PlayerInfo];
main()
{
print("\n----------------------------------");
print(" Army VS Terrorist");
print("----------------------------------\n");
}
native WP_Hash(buffer[], len, const str[]);
public OnGameModeInit()
{
SetGameModeText("AvTTDM~[3z]");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnGameModeExit()
{
return 1;
}
stock UserPath(playerid)
{
new string[128];
format(string, sizeof(string),PATH,PlayerName(playerid));
return string;
}
stock PlayerName(playerid)
{
new name[24];
GetPlayerName(playerid, name, 24);
return name;
}
stock PlayerIp(playerid)
{
new ip[24];
GetPlayerIp(playerid, ip, 24);
return ip;
}
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Money", pInfo[playerid][pMoney]);
INI_Int("Score", pInfo[playerid][pScore]);
INI_Int("Kills", pInfo[playerid][pKills]);
INI_Int("Deaths", pInfo[playerid][pDeaths]);
INI_Int("Level", pInfo[playerid][pLevel]);
INI_Int("VIP", pInfo[playerid][pVIP]);
INI_String("Pass", pInfo[playerid][pPass]);
INI_String("IP", pInfo[playerid][pIP]);
return 1;
}
public OnPlayerConnect(playerid)
{
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOGID+2, DIALOG_STYLE_PASSWORD, "Login","Type your password below to login.","Login","Quit");
}
else
{
ShowPlayerDialog(playerid, DIALOGID+1, DIALOG_STYLE_PASSWORD, "Registration","Type your password below to register a new account.","Register","Quit");
}
return 1;
}