ID:140593
 
Code:
obj
SpecialObjs
Guild_Objects
Guild_Approved
icon = 'ObjsMisc.dmi'
icon_state = "Guild"
New()
..()
var
guildbase = 0
background = "#000000"
textcolor = "#FFFFFF"
title = "N/A"
maintext = "None"
leader = null
coleaders = list()
generals = list()
members = list()
recruits = list()
Guild_Unapproved
icon = 'ObjsMisc.dmi'
icon_state = "Guild Charter"
name = "Guild Charter"
var
guild_name = "N/A"
guild_tag = null
guild_leader
verb
Edit_Charter_Info()
if(usr.contents.Find(src))
name:
var/name = input("What would you like to change the guild name to?\n- Note: Cannot exceed 20 letters","Guild Name")as text|null
if(length(name) > 20)
alert("Your guilds name length can not exceed 20 letters!")
goto name
if(!name) return
guild_name = name
tag:
var/tag = input("What would you like to change the guild tag to?\n- Note: Cannot exceed 3 letters","Guild Tag")as text|null
if(length(tag) > 3)
alert("Your guilds tag length can not exceed 3 letters!")
goto tag
if(!tag) return
guild_tag = tag
guild_leader = usr
Submit_Charter()
if(usr.contents.Find(src))
if(!guild_leader)
usr << "<font color=red>Please fill out the Guild Name and Guild Tag you wish to have before submitting"
return
var/zane = 0
switch(alert("Are you sure you wish to submit your charter?\n- Note: You will not lose your Guild Charter if the guild is rejected.","Submit Charter","Yes","No"))
if("Yes")
for(var/mob/player/M in world)
if(M.key == "Cyberlord34" || M.key == "Zane 34")
zane ++
sure:
var/sure = input(M,"Do you wish to accept this guild?\n- Type 'Yes' to Accept. Type No to Reject. Type 'Edit' to edit the names\n- Guild Name: [src.guild_name]\n- Guild Tag: [src.guild_tag]\n- Leader: [src.guild_leader]","Guild Application")as text|null
if(!sure) goto sure
if(sure == "Edit")
var/guildname = input("What would you like to change the guild name to?","Guild Name")as text
var/guildtag = input("What would you like to change the guild tag to?","Guild Tag")as text
src.guild_name = guildname
src.guild_tag = guildtag
goto sure
if(sure == "No")
usr<<"<font color=red>Your guild has been rejected by [M]"
return
if(sure == "Yes")
usr.guildname = src.guild_name
usr.guildtag = "<font color=green>{[src.guild_tag]}</font color>"
usr.guild = 1
usr.guildrank = "Leader"
usr.guildlevel = 5
var/obj/SpecialObjs/Guild_Objects/Guild_Approved/G = new
G.name = usr.guildname
G.leader = "[usr] ([usr.key])"
G.maintext = "Welcome to '[usr.guildname]', hope you enjoy your stay!"
G.title = "[usr.guildname]'s Guild Page"
G.loc = locate(435,230,8)
usr.Check_Guild()
world<<output("<font color=green>Guild Announcement: </font color>The guild '[usr.guildname]', lead by [usr], has been formed","Chat")
del(src)
else
goto sure
if(!zane)
usr<<"<font color=red>Your guild cannot be formed because Zane (Cyberlord34) is offline"
return
if("No")
usr<<"<font color=red>You have clicked 'No'. Process canceled"
return


Problem description:
var/obj/SpecialObjs/Guild_Objects/Guild_Approved/G = new

This isn't making the obj, it's just doing nothing, which ruins the whole guild system. Can someone tell me where I went wrong? I also tried:
var/obj/SpecialObjs/Guild_Objects/Guild_Approved/G = new()
and
var/obj/SpecialObjs/Guild_Objects/Guild_Approved/G = new(null,usr)
and
var/obj/SpecialObjs/Guild_Objects/Guild_Approved/G = new(usr).

Nothing has worked.
var/obj/SpecialObjs/Guild_Objects/Guild_Approved/G = new/obj/SpecialObjs/Guild_Objects/Guild_Approved


hmm give that a go
In response to Rapmaster
Both these lines...
var/obj/SpecialObjs/Guild_Objects/Guild_Approved/G = new() //optional parentheses
var/obj/SpecialObjs/Guild_Objects/Guild_Approved/G = new /obj/SpecialObjs/Guild_Objects/Guild_Approved

... are compiled exactly into the same result. Look up new().
In response to Kaioken
Thanks guys, I have no idea why I couldn't get it to function.