15.06.2011, 09:32
Hey guys,
Im working on a bank FS, and i just got a new problem with making a new userfile.
When i register the bank account (on a command), enter a password, it creates a file. But there's one problem with the file, its just called "65ni". I dont know what i did wrong, and aslong as i know im doing it the right way. Getting no errors when compiling, and the code is down here.
~Wesley
Im working on a bank FS, and i just got a new problem with making a new userfile.
When i register the bank account (on a command), enter a password, it creates a file. But there's one problem with the file, its just called "65ni". I dont know what i did wrong, and aslong as i know im doing it the right way. Getting no errors when compiling, and the code is down here.
pawn Код:
#define Bankfile "AdvancedBank/Users/%.ini" // The bank file define
new file[100], name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name)); // Gets the player name
format(file, sizeof(file), Bankfile, name); // Formats the bank file, so the file can be created
dini_Create(file); // Creates the file "65ni"
dini_Set(file, "Bank owner", name);
dini_IntSet(file, "Password", num_hash(inputtext));
dini_IntSet(file, "Registered", 1);
dini_IntSet(file, "Cash amount", 0);
dini_IntSet(file, "Logged", 1);
format(string, sizeof(string), " ** You succesfully registered your bank account. Account name: %s, Password: %s", name, inputtext);
SendClientMessage(playerid, SKY_BLUE, string);