file creation not working
#1

pawn Код:
if (fexist(playername(i))) return false;
new File:fhnd;
fhnd=fopen(playername(i),io_write);
if (fhnd) {
fclose(fhnd);
return true;
}
why this code is not working? weird ;/
Reply
#2

use fwrite(fhnd," ");
Reply
#3

yeah but i'm using dini_set later on, so i don't think this line should be added?

//edit: it's not working

//edit2: i uploaded all a_samp into my map, could i do something wrong and damage some function?
Reply
#4

If you are using dini, you can do something like this under your register command:


Код:
     new file[128];
     new string[128];
     new name[MAX_PLAYER_NAME];
     GetPlayerName(playerid, name, sizeof(name));
     format(file,sizeof(file),"/Accounts/%s.ini",name); // you need a folder "Accounts" in script files
     if(!fexist(file))
     {
	dini_Create(file);
       //your stat saving variables here
     }
Reply
#5

i was using dini_Create before but it was not working so i changed it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)