01.11.2014, 18:31
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)
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)