SA-MP Forums Archive
Saving GETTIME() will stop saving - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Saving GETTIME() will stop saving (/showthread.php?tid=544404)



Saving GETTIME() will stop saving - iPrivate - 01.11.2014

Hey guys.

Today, and some days before, I've been encountering a strange bug.

The bug started off by the VIP system I was working on. The VIP system was working fine, until I decided to make a expire date. I used "gettime()", because "getdate()" get's the date since start of year, and since we are near Christmas now, I was sure that the system would get bugged.

Well, I stored this "gettime" to PlayerInfo[playerid][pExpiring]. I started testing, and it looked cool, everything would print on the console and everything would be cool, for the time that I would be in-game.

When I would go out, nothing would save. I didn't know what the problem was, because some of the other things would work for sure, but this wouldn't.

Well, today, I started putting some prints on the saving system, and I found out that the print after the "expire" would not work.

I commented it out, and it started working (everything else would save, except the "expire"). After on, I did a lot of tries, to get things working, until I thought of long integer. So I decided to cut it in half, meaning

PlayerInfo[playerid][pExpiring] / 2, and so, it started working.

If I wanted to do things with the expiring, I will now PlayerInfo[playerid][pExpiring] * 2.

I don't know if I'm speaking shits up there or if it is a real bug, but, I'm just speaking what bug I've been trying to fix for 3 days now.

EDIT: I forgot to point out, that GETTIME is added an extra month, which is 30 days added into that "GETTIME" function and than saved. (less words, 2592000 seconds)


Re: Saving GETTIME() will stop saving - Kar - 09.11.2014

Is the time on your computer correct?


Re: Saving GETTIME() will stop saving - iPrivate - 27.03.2015

Have been inactive recently on the forums, and this might be considered as bumping old thread.. :3

But, yes, my computer time was correctly set back then.


Re: Saving GETTIME() will stop saving - Pottus - 27.03.2015

gettime() will never fail it is a solid function the problem is something your fucking up.


Re: Saving GETTIME() will stop saving - iPrivate - 05.11.2015

Bumping old thread but still. I havent tried, but what about being an Y_INI bug instead?.. Working fine with MySQL (of course it would with MySQL)


Re: Saving GETTIME() will stop saving - Vince - 05.11.2015

Well, valstr bugs with large numbers, timestamps in this case. Apparently it's been patched, so you may be using an older version that has the bug still in it.