ID:261880
 
Well, I'll begin by explaining the problem.


When a player wants to create a party, (in my game, its known as a Fellowship), I want them to have the ability to name the party. Personally, just to give them a small sense that it gives people an idea of what there party is doing, representing, or for whatever reason, I'm sure it'll make the game slightly more pleasant either way.

Anyway, the problem is, I can't seem to just get that one varaible just right, I'm sorry I'm still getting adapted to Byond, and I know theres an obvious or simple solution to this, so I only ask if anyone could help with this code I'd appreciate it.

The problem is in the join verb, it'll either display the name of an earlier Fellowship(party) they form'd, or it'll display a space, where the name of the party should be. Code is provided below:

    verb/Begin_Fellowship()
set category = "Fellowship"
var/prompt_title = "Creating Fellowship"
var/info_text = "((Pick an appropriate name for your Fellowship))"
var/default_value = "[usr]'s fellowship"
partyname = input(usr, info_text, prompt_title, default_value) as null|text
if(src.inparty==1)return
world<<"<b><font color = blue><small>[src] has formed a new Fellowship, [partyname]"
party.Add(src)
src.inparty=1
src.Refresh_Party()
src.leader=src.name

verb/Join_Fellowship()
set category="Fellowship"
var/i=0
if(usr.inparty==1)
return
for(var/mob/m in oview(3))
if(m.partylock==1)
usr<<"[src.leader] doesn't want anymore members.";return
for(var/mob/c in m.party)i++
if(m.name==m.leader&&i<5&&m.key!=null)
m.party+=src
src.party=m.party
m.Refresh_Party()
for(var/mob/p in m.party)p<<"<b><font color = blue><small>[src] has joined [usr.partyname]."
return
else
if(m.name==m.leader&&i>5&&m.key!=null)src<<"The group is too big, any bigger it'd be an army!"


Now I know I'm doing SOMETHING wrong, if someone would please care to correct my mistake, I'd really appreciate it.
Try m.partyname rather than usr.partyname in the Join verb.
Why do you have src in one and usr in the other?