I am trying to work out a persistent issue I am having with the latest Mystic BBS version, Mystic 1.12 Alpha 47.
I suspect the problem is the comparison between the UserLastOn and the date of the file.
Yep, they are not the same date type as g00r00 explained to me... I ran into the same thing... this will work because it will convert the UserLastOn, which is a dos date, I belive to a unix date...
if Dateu2d(UserLastOn) <= GetFileDate(Entry.Bullfile) then S:='[NEW]'
if Dateu2d(UserLastOn) > GetFileDate(Entry.Bullfile) then S:=' '
Hope that helps...
I did try it before, and it didn't work. I suspect maybe GetFileDate isn't returning a unix date either.
Do you know how I can print the values?
I believe just printing the dates will work like...
writeln(GetFileDate)
It won't tell you the type, obviously, but you'll see the values are too far apart to work in a comparison.
I'm thinking there is dud data there. When I chnage the second line to
writeln('User '+username+' last on ='+datestr(dateu2d(UserLastOn),1))
I have used the following lines to print values...
writeln('User last on ='+datestr(dateu2d(UserLastOn),1))
writeln('File date = '+datestr(dateu2d(GetFileDate(Entry.Bullfile)),1))
The filedate seems right, but the userlast on is 00/14/229, way too high!
I'm thinking there is dud data there. When I chnage the second line to
writeln('User '+username+' last on ='+datestr(dateu2d(UserLastOn),1))
I now get the right date, but the filedate is 10/04/14, way too old.
UserLastOn is read from the GetUser function. Does this need to be
called in the script, or is the value fed to the script regardless?
For some reason, adding the printing of 'username' changes the dates!
If I remove it, it goes back to its old behaviour.
Perhaps, it's the datestr that's further confusing things... I was comparing the raw numbers as well... If you like, I can send you a copy
of mine that's working...
Thanks for your help!
Sysop: | Eric Oulashin |
---|---|
Location: | Beaverton, Oregon, USA |
Users: | 96 |
Nodes: | 16 (1 / 15) |
Uptime: | 10:48:57 |
Calls: | 4,663 |
Calls today: | 4 |
Files: | 8,491 |
Messages: | 349,792 |