New to DateTime and google is sincerely failing me. I'm currently using a DateTime variable to track time in my game.
The problem is, is that any attempt of changing said DateTime is resulting in a "Property [time] is ReadOnly" error. Any help, working alternatives or roundabouts would be appreciated.
Sub IncreaseTime(unit As Integer)
Dim NewDate As DateTime
With World.WorldTime
NewDate = New DateTime(.Date.Year, .Date.Month, .Date.Day, .Date.Hour, .Date.Minute, .Date.Second + unit)
.Date = NewDate
End With
End Sub
Edit #1;
Sub IncreaseTime(unit As Integer)
Dim NewDate As DateTime
With World.WorldTime
NewDate = NewDate.AddSeconds(unit)
.Date = NewDate
End With
End Sub
Edit #2;