Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Friends List
#1
Okay, possibly one of the most annoying things I've ever tried to do... and I don't know why.

My version would only save and load one friend, even though the max amount of friends is 10.

I took out all my code and ripped out elysium diamonds friend list, which also did not work.

I know it's relatively easy, I'm just having another one of those days lol. Anyone post a tut for me please?
Reply
#2
how about you post yours here and we help you to fix it ? -_-

(dont thinki that i want to use yours, i already have a friends list Smile )
Reply
#3
LOl, I got mad and deleted all the code...

I found the reson the one from elysium didn't work. He's added a little NEXT_CHAR variable and I'm not quite sure why.

I'll start from scratch and see if I can get it to work this time.. since I just woke up and can sort of think lol.
Reply
#4
Okay, firedns list is working... somewhat lol.

I can save, load, delete, and add friends without any noticable issue.

Just need to fix a way to send message sbetween em ..
Reply
#5
Code:
Type FriendRec
    Name as String * NAME_LEGNTH
End Type


Public Friend(0 to MAX_FRIENDS) as Friend Rec

Public Const MAX_FRIENDS = 20


Type PlayerRec
    *Blah Blah Blah*
    
    For i = 1 to max_friends
        Friend(i).Name
    Next i
end type


Then do all the saving/loading adding/sending stuff and you're done.
Reply
#6
I actually did it like this, which looks cleaner in my mind :p:

Code:
Type FriendRec
       Name as string * Name_Length
End Type

Type PlayerRec
      
       Friends(1 to MAX_FRIENDS) as FriendRec
End Type

Smile
Reply
#7
Leighland Wrote:I actually did it like this, which looks cleaner in my mind :p:

Code:
Type FriendRec
       Name as string * Name_Length
End Type

Type PlayerRec
      
       Friends(1 to MAX_FRIENDS) as FriendRec
End Type

Smile



why dont you just write:

Friends(1 to MAX_FRIENDS) as string o.O
Reply
#8
Because, he's defining it as the friends rec, meaning, if I'm correct, it includes anything in the friends rec. Later on, he might wish to add more to it.
Reply
#9
Advocate Wrote:Because, he's defining it as the friends rec, meaning, if I'm correct, it includes anything in the friends rec. Later on, he might wish to add more to it.


but what do you wanna add except names of friends, there isnt really anything i can think of xD

but its true what you said advocat Smile
Reply
#10
Well, maybe players would want to peronalize their contacts, add real names or something. Also, this system could be used for saving messages when a player is offline.

There are alot of things you could do with a friendslist.
Reply
#11
Advocate Wrote:Well, maybe players would want to peronalize their contacts, add real names or something. Also, this system could be used for saving messages when a player is offline.

There are alot of things you could do with a friendslist.

That's what I was aiming at. I wanted to set up a system like onquer online where you can message an offline player and have them recieve the message when they log in.
Reply
#12
He's right, i set it up so you can add later, maybe Friend/Enemy... other contact names, ect... just a real simple base for anyone who really wanted to get started with it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)