y_ini /%s/%s.ini
#1

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"
Reply
#2

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'.
Reply
#3

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
Reply
#4

You can't create folders.

Only with this plugin: https://sampforum.blast.hk/showthread.php?tid=92246
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)