SA-MP Forums Archive
Fast help - 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: Fast help (/showthread.php?tid=400464)



Fast help - Face9000 - 18.12.2012

pawn Код:
public SaveAllStats()
{
    new count;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(fexist(Path(i))
    {
    new INI:File = INI_Open(Path(i));
    INI_SetTag(File,"data");
    INI_WriteInt(File,"Cash",GetPlayerCash(i));
    INI_WriteInt(File,"Admin",PlayerInfo[i][pAdmin]);
    INI_WriteInt(File,"Kills",GetPlayerScore(i));
    INI_WriteInt(File,"Deaths",PlayerInfo[i][pDeaths]);
    INI_WriteInt(File,"NoPm",PlayerInfo[i][pNopm]);
    INI_WriteInt(File,"Mute",PlayerInfo[i][pMuted]);
    INI_WriteInt(File,"Vip",PlayerInfo[i][pVip]);
    INI_WriteInt(File,"C4",PlayerInfo[i][pC4]);
    INI_WriteInt(File,"Banned",PlayerInfo[i][pBanned]);
    INI_WriteInt(File,"Cookies",PlayerInfo[i][pCookies]);
    INI_WriteInt(File,"Warn",PlayerInfo[i][pWarn]);
    INI_WriteInt(File, "RegisterDate_day",PlayerInfo[i][RegisterDate_day]);
    INI_WriteInt(File, "RegisterDate_mon",PlayerInfo[i][RegisterDate_mon]);
    INI_WriteInt(File, "RegisterDate_year",PlayerInfo[i][RegisterDate_year]);
    INI_WriteInt(File, "RegisterDate_hour",PlayerInfo[i][RegisterDate_hour]);
    INI_WriteInt(File, "RegisterDate_min",PlayerInfo[i][RegisterDate_min]);
    INI_WriteInt(File, "RegisterDate_sec",PlayerInfo[i][RegisterDate_sec]);
    INI_WriteInt(File,"Jailed",PlayerInfo[i][pJailed]);
    INI_WriteInt(File,"Logged",PlayerInfo[i][pLogged]);
    INI_WriteInt(File,"B_Time",PlayerInfo[i][B_Time]);
    INI_WriteInt(File,"B_Till",PlayerInfo[i][B_Till]);
    INI_WriteInt(File,"AdminActions",PlayerInfo[i][pAdminActions]);
    INI_WriteInt(File,"Rank",PlayerInfo[i][pRank]);
    INI_Close(File);
    }
    }
    SaveServerStats();
    new msg[128];
    format(msg,128,"System: Stats for %d online players have been autosaved.",count);
    SCMTA(0x7DAEFFFF,msg);
    new ok[128];
    format(ok,128,"0,6System: Stats for %d online players have been autosaved.",count);
    IRC_Say(gGroupID, IRC_CHANNEL, ok);
    return 1;
}
(2255) : error 001: expected token: ")", but found "{"

Line 2254 - 2255:
pawn Код:
if(fexist(Path(i))
    {
"Path" is releated to the player account saving file.


Re: Fast help - Mike_Peterson - 18.12.2012

Could you give send the codes instead that define the Path function?



This forum requires that you wait 120 seconds between posts. Please try again in 15 seconds.
R.I.P. me if this happens again :@:@


Re: Fast help - smeti - 18.12.2012

What is the "Path"?

pawn Код:
new Path[MAX_PLAYERS][100]; // ?

// Try:
if(fexist(Path[i])
{



Re: Fast help - Riddick94 - 18.12.2012

pawn Код:
if(fexist(Path(i))
Count brackets.


Re: Fast help - Face9000 - 18.12.2012

Fixed, stupid me.