Doesn't save unix timestamp.
#1

<FIXED>
Reply
#2

Run this and tell me which of them are being printed and which of them aren't.
pawn Code:
SaveAccount(playerid)
{
    print("Save started");
    new INI:File = INI_Open(Path(playerid));
    print("File opened");
    printf("* Value check: %i",PlayerInfo[playerid][pTempBanned]); // Works
    INI_WriteInt(File,"TempBanned", PlayerInfo[playerid][pTempBanned]);
    print("Written the value in file");
    INI_Close(File);
    print("Saved"); // Doesn't work
    return 1;
}
Reply
#3

Code:
[15:13:28] File opened
[15:13:28] * Value check: 1419790408
Reply
#4

You aren't setting the tag. Can you show me your registration code? So I can provide the same and valid tag.
Reply
#5

Quote:
Originally Posted by biker122
View Post
You aren't setting the tag. Can you show me your registration code? So I can provide the same and valid tag.
Check the OP, I am.
Code:
SaveAccount(playerid)
{
	print("Save started");
	new INI:File = INI_Open(Path(playerid));
        INI_SetTag(File,"data"); // The tag?
	printf("%i",PlayerInfo[playerid][pTempBanned]); // Works
	INI_WriteInt(File,"TempBanned", PlayerInfo[playerid][pTempBanned]);
	INI_Close(File);
	print("Saved"); // Doesn't work
	return 1;
}
I added the tag to your code.

This is what I ran:
Code:
SaveAccount(playerid)
{
    print("Save started");
    new INI:File = INI_Open(Path(playerid));
    INI_SetTag(File, "data");
    print("File opened");
    printf("* Value check: %i",PlayerInfo[playerid][pTempBanned]); // Works
    INI_WriteInt(File,"TempBanned", PlayerInfo[playerid][pTempBanned]);
    print("Written the value in file");
    INI_Close(File);
    print("Saved"); // Doesn't work
    return 1;
}
Reply
#6

Do they print after setting the tags?
Reply
#7

Quote:
Originally Posted by biker122
View Post
Do they print after setting the tags?
This was the result with the tag.
Quote:
Originally Posted by Facerafter
View Post
Code:
[15:13:28] File opened
[15:13:28] * Value check: 1419790408
Reply
#8

I got no idea with this. I don't understand why it happens...
Reply
#9

Anyone?
Reply
#10

Bump.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)