SA-MP Forums Archive
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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help (/showthread.php?tid=178701)



Help - FireCat - 23.09.2010

i was here on the forum watching a guy and he had problem on score me too my stuff never writes nothing
look
my code
Код:
new file[MAX_PLAYER_NAME+25], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), "scriptfiles/mygamemode/users/%s.txt", name);
    dini_IntSet(file, "Score", GetPlayerScore(playerid));
and iv tryed
Код:
new file[MAX_PLAYER_NAME+25], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), "mygamemode/users/%s.txt", name);
    dini_IntSet(file, "Score", GetPlayerScore(playerid));
and a proof

but it dosnt save
i have
Код:
#include <dini>
but still
it dosnt write


Re: Help - Hiddos - 23.09.2010

fwrite automatically stores in the scriptfolder and it's subfolders. So you need to remove the "scriptfiles\" part lol.


Re: Help - FireCat - 23.09.2010

Quote:
Originally Posted by Hiddos
Посмотреть сообщение
fwrite automatically stores in the scriptfolder and it's subfolders. So you need to remove the "scriptfiles\" part lol.
lol if u see i sayed i tryed the 2 ways -.- but still it dosnt write


Re: Help - Mike_Peterson - 23.09.2010

:P have u created the file? as in register?

Код:
dini_Create(file);
like that?


Re: Help - FireCat - 23.09.2010

Quote:
Originally Posted by Mike_Peterson
Посмотреть сообщение
:P have u created the file? as in register?

Код:
dini_Create(file);
like that?
where do i put ?
Код:
dini_Create(file);
dini_Create(file);


Re: Help - Mike_Peterson - 23.09.2010

on /register command so it will create a file named for example FireCat.txt