C:\Users\Anonymous\Desktop\San Fierro\gamemodes\sanfierro.pwn(21) : error 037: invalid string (possibly non-terminated string)
C:\Users\Anonymous\Desktop\San Fierro\gamemodes\sanfierro.pwn(21) : error 017: undefined symbol "Users"
C:\Users\Anonymous\Desktop\San Fierro\gamemodes\sanfierro.pwn(21) : error 017: undefined symbol "s"
C:\Users\Anonymous\Desktop\San Fierro\gamemodes\sanfierro.pwn(21) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
stock Path(playerid)
{
new str[128],name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(str,sizeof(str),UserPath,name); // Line 21
return str;
}
stock UserPath(playerid)
{
new string[128],playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(string,sizeof(string),PATH,playername);
return string;
}
#define UserPath "Users/%s.ini"
#include <a_samp>
#include <YSI\y_ini>
#include <zcmd>
#define UserPath "Users/%s.ini"
enum PlayerInfo
{
Pass,
Admin,
Cash,
}
new pInfo[MAX_PLAYERS][PlayerInfo];
stock Path(playerid)
{
new str[128],name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(str,sizeof(str),UserPath,name);
return str;
}
forward loadaccount_user(playerid, name[], value[]);
public loadaccount_user(playerid, name[], value[])
{
INI_String("Password", pInfo[playerid][Pass]);
INI_Int("Admin",pInfo[playerid][Admin]);
INI_Int("Cash",pInfo[playerid][Cash]);
return 1;
}
main() {}
public OnGameModeInit()
{
EnableStuntBonusForAll(0);
DisableInteriorEnterExits();
SetGameModeText("SF:RP 1.0");
SFRP = TextDrawCreate(30,430,"San Fierro Roleplay");
TextDrawFont(SFRP,0);
return 1;
}
public OnPlayerConnect(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
if(fexist(Path(playerid)))
{
INI_ParseFile(Path(playerid),"loadaccount_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid,1,3,"Login","Type in your password to login","Login","Leave");
else
{
ShowPlayerDialog(playerid,2,3,"Registration","Type in a password to register","Register","Leave");
return 1;
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 2)
{
if(!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid,2,3,"Registration","Type in a password to register","Register","Leave");
return 1;
}
//If they have entered a correct password for his/her account...
new pass;
new INI:file = INI_Open(Path(playerid));
INI_SetTag(file,"Player's Stats");
INI_WriteString(file,"Password",pass);
INI_WriteInt(file,"Admin",0);
INI_WriteInt(file,"Cash",25);
INI_Close(file);
//Tell to them that they have successfully registered a new account
return 1;
}
}
if(dialogid == 1)
{
if(!response) return Kick(playerid);
if(response)
{
if(!strcmp(pass,pInfo[playerid][Pass])) //If they have insert their correct password
{
INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
GivePlayerMoney(playerid,pInfo[playerid][Cash]);
}
else
{
ShowPlayerDialog(playerid,1,3,"Login","Type in your password to login\nIncorrect password!","Login","Leave");
return 1;
}
}
}
return 1;
}
public OnPlayerDisconnect(playerid,reason)
{
if(fexist(Path(playerid)))
{
new INI:file = INI_Open(Path(playerid));
INI_SetTag(file,"Player's Stats");
INI_WriteInt(file,"Admin",pInfo[playerid][Admin]);
INI_WriteInt(file,"Money",GetPlayerMoney(playerid));
INI_Close(file);
return 1;
}
return 1;
}
C:\Users\Desktop\San Fierro\gamemodes\sanfierro.pwn(28) : error 017: undefined symbol "INI_String"
C:\Users\Desktop\San Fierro\gamemodes\sanfierro.pwn(41) : error 017: undefined symbol "SFRP"
C:\Users\Desktop\San Fierro\gamemodes\sanfierro.pwn(42) : error 017: undefined symbol "SFRP"
C:\Users\Desktop\San Fierro\gamemodes\sanfierro.pwn(54) : warning 217: loose indentation
C:\Users\Desktop\San Fierro\gamemodes\sanfierro.pwn(54) : error 029: invalid expression, assumed zero
C:\Users\Desktop\San Fierro\gamemodes\sanfierro.pwn(59) : warning 225: unreachable code
C:\Users\Desktop\San Fierro\gamemodes\sanfierro.pwn(62) : warning 217: loose indentation
C:\Users\Desktop\San Fierro\gamemodes\sanfierro.pwn(62) : error 029: invalid expression, assumed zero
C:\Users\Desktop\San Fierro\gamemodes\sanfierro.pwn(62) : error 004: function "S@@_OnDialogResponse" is not implemented
C:\Users\Desktop\San Fierro\gamemodes\sanfierro.pwn(64) : error 017: undefined symbol "dialogid"
C:\Users\Desktop\San Fierro\gamemodes\sanfierro.pwn(66) : error 017: undefined symbol "response"
C:\Users\Desktop\San Fierro\gamemodes\sanfierro.pwn(67) : error 017: undefined symbol "response"
C:\Users\Desktop\San Fierro\gamemodes\sanfierro.pwn(69) : error 017: undefined symbol "inputtext"
C:\Users\Desktop\San Fierro\gamemodes\sanfierro.pwn(78) : error 035: argument type mismatch (argument 3)
C:\Users\Desktop\San Fierro\gamemodes\sanfierro.pwn(75) : warning 203: symbol is never used: "pass"
C:\Users\Desktop\San Fierro\gamemodes\sanfierro.pwn(75 -- 86) : error 017: undefined symbol "dialogid"
C:\Users\Desktop\San Fierro\gamemodes\sanfierro.pwn(75 -- 88) : error 017: undefined symbol "response"
C:\Users\Desktop\San Fierro\gamemodes\sanfierro.pwn(75 -- 88) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
14 Errors.