ID:164768
 
Code:


Problem description:
Im having a problem.....i made a game w/ this verb to make a "party" and when i logout and come bac i cant control the "party" or talk to the members

Despite your glaring lack of code. Your problem is probably that you either aren't saving the group information correctly, or aren't saving it at all.

If you're using a generic save system that just saves all your variables automatically, you could have a variable that you set as the same as everyone else in the party. This way, no matter who was or wasn't logged on, you'd all have that same variable.

I have a feeling you're using something like "usr.group" and just getting yourself into all sorts of trouble with it. If you try to save your group, what you'll be doing is saving the people who are in your group along with your character, and they'll be loaded (as copies) along with your character, probably just ending up in a null loc.

For your own sake, try the common variable method for now.


... and apparently one post about this wasn't enough...
In response to DerDragon
...........
In response to Kira4th
how?
In response to Kira4th
i got the group thing in the library

"GuildSystem" by Mega fart cannon
http://developer.byond.com/hub/Megafartcannon/GuildSystem
In response to Kira4th
mob
var
partyowner = ""//will become [src] as you
party = ""//this is for your vars so when you create a party you should have [partyname] or something god ive been away too long btw im at school doing this
In response to Rickoshay
......but his u connect the var to the mega person
In response to Kira4th
I personally would create partying arrangements with something like this:

#define MAX_PARTY 3

mob/var
leader
list/party = new()

proc
get_party(mob/A)
if (A.leader) A = A.leader
return list(A,A.party)

party_msg(mob/A,msg)
get_party(A) << "[A.name] talks to the party, '[msg]'"

induct(mob/leader,mob/target)
if (length(leader.party) >= MAX_PARTY) // no more than defined amount in your party
leader << "You already have [MAX_PARTY] people in your party."
return
if (target.leader || length(target.party)) // target mobile is in a party or running one already
leader << "Look for someone who isn't in a party already!"
return
leader.party += target
target.leader = leader

reject(mob/leader,mob/target)
if (target.leader != leader)
leader << "What the... how did you become a part of this?"
return
if (!leader.party.Find(target))
leader << "They aren't even in your party, punk."
return
target.leader = null
leader.party -= target

/*
** I (personally) would get rid of the warnings in the
** reject and induct procs, and put them in a verb that calls them.
** Or you could just convert them to verbs and forget the procedures all together.
*/


You must always be sure that inductee is placed in leader's party, and inductee's leader is seat to leader.
(which is why I included the induct and reject procedures)

I also suggest that these variables not be saved (make them temporary or something).
Just for the reason that it may cause problems in the future.
Party members logging off, the leader, heaven forbid.

PS: Rickoshay, variables are null by default. There's no need to set their value to "".

PPS: And after reading the other posts; if you're looking for a guild system, you will most likely be required to use savefiles or something of the sort, just for the sake of saving the game from unneccessary clutter of variables and such.
In response to Keeth
Thanks keeth never really thought about that.