mob
proc
FinalizeGuild()
set hidden=1
world<<"Section 1 Phase 1"
var/NewGuildName=winget(src,"CreateGuild.NameSelect","text")
world<<"Section 1 Phase 2"
if(!NewGuildName){winset(src,"World.CreateGuild","is-visible=false");return}
if(GuildsList.Find(NewGuildName)){src<<output("That name is already in use.","CreateGuild.Error");return}
if(length(NewGuildName)>15){src<<output("The name you selected is to long. (15 Character Maximum)","CreateGuild.Error");return}
if(length(NewGuildName)<3){src<<output("The name you selected is to short. (3 Character Minimum)","CreateGuild.Error");return}
if(Check_For_Tagilitys(NewGuildName,HTMLTAGS)==TRUE){src<<output("Your name may not have HTML in it.","CreateGuild.Error");return}
if(Check_For_Nums(NewGuildName,NUMTAGS)==TRUE){src<<output("Your name may not have numbers in it.","CreateGuild.Error");return}
if(Check_For_Syms(NewGuildName,SYM_TAGS)==TRUE){src<<output("Your name may not have symbols in it.","CreateGuild.Error");return}
if(Check_For_Swearing(NewGuildName,SWEAR_TAGS)==TRUE){src<<output("Your name may not have swears in it.","CreateGuild.Error");return}
Problem description:
First I'd like to point out that I've used this code "var/varname=winget()" in several other parts of my game and it works just fine. I've asked a few other people why this is happening and no one seems to know so I figured I'd ask here.
The problem in question is, when calling the proc, it calls the first world statement as it should but the proc does not continue as intended. If I type a valid name, the proc freezes the whole game and eventually crashes the game. If I type an invalid name, the "check" procs call and report the error as intended. I'm at a complete loss here and don't know what else to try. Before you ask, yes there is more to the proc after what I've shown but I've only shown this much as I've isolated the issue to the line between the two world statements.
I'm also aware my coding style will trigger some/most people.