y_ini /%s/%s.ini - 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: y_ini /%s/%s.ini (
/showthread.php?tid=346917)
y_ini /%s/%s.ini -
TzAkS. - 30.05.2012
I`m trying to do the user path on one folder like this
/%s/%s.ini
So it needs to save it like
pawn Код:
TzAkS //folder
TzAkS.ini //file
I tryed to do like this
pawn Код:
new file[128];
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
format(file, sizeof(file), "/%s/%s.ini", pname, pname);
But i have an error
error 012: invalid function call, not a valid address
Line:
pawn Код:
INI_ParseFile(file(playerid), "LoadData_%s", .bExtra = true, .extra = playerid);
And #define PATH "/%s/%s.ini" didn`t work becouse this function has just one "playername"
Re: y_ini /%s/%s.ini -
Jochemd - 30.05.2012
Like ****** said, it's not a function. It's a string and you have already put the folder/name of the player in it so just use 'file'.
Re: y_ini /%s/%s.ini -
TzAkS. - 30.05.2012
I wos in hurry,forgot that..
Fixed but it`s not creating the folder..
*** YSI Error: INI_Open could not find or create file Drivers/TzAkS/TzAkS.ini
Re: y_ini /%s/%s.ini -
IstuntmanI - 30.05.2012
You can't create folders.
Only with this plugin:
https://sampforum.blast.hk/showthread.php?tid=92246