You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How would I go about adding minutes to the actual date which will constantly update, and then save that value on variable DT2, so I can compare them later on? to do timed actions/temporary actions saved?
The text was updated successfully, but these errors were encountered:
Hi, sorry for the long delay. This repository isn't actively maintained so it took me a while to see this issue.
You have probably already found out, but I'll write it here for anyone who might be having the same issue.
Basically, DateTime.AddMinutes doens't return anything, it operates directly on the array you pass (by reference).
So, a correct way solve your problem would be:
newDateTime: now = DateTime.Now();
newDateTime: later = DateTime.Now();
DateTime.AddMinutes(later, 2);
if (DateTime.Compare(now, later) >=0) {
TempVip(playerid);
}
dt = DateTime.Now();
pInfo[playerid][pVIPLevel] = 1;
SendClientMessage(playerid,-1,"Hello");
dt2 = DateTime.AddMinutes(dt, 2);
new cell: DataCompareR = DateTime.Compare(dt,dt2);
if (DataCompareR == 0 || DataCompareR > 0){
TempVip(playerid);
}
How would I go about adding minutes to the actual date which will constantly update, and then save that value on variable DT2, so I can compare them later on? to do timed actions/temporary actions saved?
The text was updated successfully, but these errors were encountered: