ID:140098
 
Code:
obj
GuildChief
name="Guild chief"
density=1 // cant walk through him
icon='sandnpc1.dmi'
icon_state="sand1"
verb
Talk()
set category="Temporary"
var/mob/players/M
set src in oview(1)
M=usr
var/I=input("I can make you a guild for you if you got any guild symbols?","Guild chief") in list ("Trade 'Guild symbol'","Nothink")
switch(I)
if("Trade 'Guild symbol'") // taking a rest
usr<<"Here you go"
if(istype(usr,/mob/players))
var/obj/items/guildsymbol/o
for (o as obj in M.contents)
if(o.type==/obj/items/guildsymbol)
del(o)
usr.Make_Guild()
usr<<"You just created your guild"
else
usr<<"You dont have a 'Guild symbol'"
if("Nothink")usr<<"Maybe another time."
mob
proc
Make_Guild(var/Guildmaking as text)//The var/Guildmaking as text means whatever the player enters is what the variable Guildmaking is
if(!usr.guild)
if(Guilds.Find(ckey(Guildmaking)))//Next we check if the guild name is taken
alert("There is already a guild named this. Pick another name.")//If it is we tell them that is is and to pick another name
else
Guilds += ckey(Guildmaking)//If its not we add the new guild's name to the list of created guilds
src.guild = "[Guildmaking]"//Now we make the players guild variable equal the new quilds name (This will be used when inviting a player to the guild)
src.verbs += /mob/Guild/verb/Guild_Chat//We give the player the new guild verbs
src.verbs += /mob/Guild/verb/Guild_Members//We give the player the new guild verbs
src.verbs += /mob/Guild/verb/Guild_Invite//We give the player the new guild verbs
src.verbs += /mob/Guild/verb/Guild_Disband//We give the player the new guild verbs
else
usr << "You already have a guild."


Problem description:
The proc works not fully its supposed to let you type the guildname but it doesnt it just creates the guild with your own char name as guild name. Does someone know how to fix this please?

Greetings chaokai
Why even have M if you're just going to use usr. You need to be consistent.

You also don't actually prompt the usr to input a guild name.

Next time, try writing the program yourself instead of using one you don't understand.