26.03.2013, 14:04
The errors come from the command and probably from this
Or something from the custom functions.
First of all, does "FilePath(0, playerid)" return the string with the file's name and file's extension?
When the file exists, returns false otherwise it creates the file and it does return true. Try to use
If that won't work either, you have to debug your code. Any line of the command, stocks and the dialogs and see where the code stops.
Last, another question. I noticed that you ask for the date's birthday here
and then you send a message with these:
What they hold these variables? - PlayerInfo[playerid][pAge] and PlayerInfo[playerid][pDOB]
I didn't see anywhere to convert the date of B-day to his age and then set it to the first variable.
pawn Код:
if(!fexist(FilePath(0, playerid))) { file_Create(FilePath(0, playerid)); }
First of all, does "FilePath(0, playerid)" return the string with the file's name and file's extension?
When the file exists, returns false otherwise it creates the file and it does return true. Try to use
pawn Код:
if(file_Create(FilePath(0, playerid)) == 1)
{
FileLoaded[0][playerid] = true;
SaveFile(0, playerid);
}
else print("That file already exists.");
return 1;
Last, another question. I noticed that you ask for the date's birthday here
pawn Код:
SPD(playerid, DIALOG_DOB, DIALOG_STYLE_INPUT, "Date of Birth", "Please enter your {F0CD81}character's{FFFFFF} date of birth.", "Okay", "Quit");
pawn Код:
format(string, sizeof(string), "Good, so you are %d years old and you were born on %s", PlayerInfo[playerid][pAge], PlayerInfo[playerid][pDOB]);
I didn't see anywhere to convert the date of B-day to his age and then set it to the first variable.

