Sad to say, I'm using the windows version, and I don't have a compiler if ever.
Can anyone advise me how to fix the problem, and if possible, through the current limitations I have? I can only edit things via what I have in windows, and I don't have a compiler for C.
Yea, they used vnum in note list as an integer so I just set it as that as well. I don't know why they did, I guess I could change it to like nnum for note number or something, but meh...it works..heh. Once I seriously test it all out for any and all bugs, i'll post it if anyone wants it. Basically it's an easy fix for global boards if you don't want to use the smaug board system. I'm thinking about making it to where if they are in a room with a board, they can read that one and post to it, but if they are not in that room it goes to the main global board. We'll see what I come up with.
I set last_read as an integer instead of time. So when it's adding up the vnum's for the notes, I'm checking to see if the number stored in the char's pfile is smaller than the new vnums out there.
So if there were 5 notes for that player, but his pfile had 2 stored in last_read then when he logged in, it would say you have 3 notes. Then when he read them it would update in his pfile so after he's done reading note 5, his pfile now says 5 in last_read.
I've pretty much got all the kinks out and it's working quite well. It updates on note read, and note post and also works correctly in chk_unread.
Ok, I figured it out. I used the int vnum from the posts and changed last_read to an int in pc_data.
if (vnum > ch->pcdata->last_read)
I now have global boards and can check everytime I log on to see the new notes I have.
Just curios though, Zeno.
What's wrong with this board.c? Is there memory leaks on it or what? I know you said you didn't like it so you made your own. Could you give me a glimpse of what was wrong so I can fix it? I haven't found anything wrong with it yet.
Well, you have to set the time somewhere if you're going to test it against last_read. Somewhere, you need to set some reasonable time for each individual note, as well as making sure it gets loaded and saved to board files. I can't really help much more because I don't know anything about the snippet you're using.
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.