ID:2876206
 
(See the best response by Ter13.)
Code:
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.
to clarify, the output you are seeing is "Section 1 phase 1", but "section 1 phase 2" is not showing up?
Yes, that is correct.
    world<<"Section 1 Phase 1 [src?.client && "valid"]"


Modify the first debug output to this. Let me know if it prints valid after the debug output.
Upon doing as you say, it returns a runtime error.

Programming\Interface Commands.dm:70:error: expected ':'
In response to Cyber Gaming
Cyber Gaming wrote:
Upon doing as you say, it returns a runtime error.

Programming\Interface Commands.dm:70:error: expected ':'

That's a compiler error, not a runtime. What version of BYOND are you using?

Also, what is on line 70?
Line 70 is exactly what you had me use.

world<<"Section 1 Phase 1 [src?.client && "valid"]"

My byond version is very old. 498.1164. I'm aware that'll cause a debate but I use it for a number of reasons and I will not update to the latest version.
In response to Cyber Gaming
Cyber Gaming wrote:
My byond version is very old. 498.1164. I'm aware that'll cause a debate but I use it for a number of reasons and I will not update to the latest version.

You really should lead with the fact that you are using a version of BYOND that's old enough to stay up late and watch Carson.

Can't stop you from making stupid choices. Just won't help you make them.
I figured I wouldn't get help posting here, I haven't since day one so I didn't expect that to change. Whatever.
I figured I wouldn't get help posting here, I haven't since day one so I didn't expect that to change

If you are having problems upgrading to a modern BYOND build, I'm more than willing to help. I won't help you with 498 though.
I'm never upgrading, that's out of the question. I see no point. The latest client has features I'll never use, I refuse to have my players sit through a black screen for 30 seconds. My game is going on Steam when I finish two more coding tasks and changing out assets. I'm not doing things to intentionally irritate my potential player base. When Lummox gets rid of the broken ad splash screen that's never worked from day one, I might "think" about it.

Since receiving help here is simply not going to happen, I wont be reviewing this site again. I'll just figure out a different way to fix this winget issue on my own.
Best response
When Lummox gets rid of the broken ad splash screen that's never worked from day one, I might "think" about it.

My game is going on Steam when I finish two more coding tasks and changing out assets.

1) Lummox has already fixed this. It only shows a 30 second membership beg now if you are using Dream Seeker.

2) If you are using BYONDexe to sell your game on steam, it doesn't have the ads OR the membership beg.

3) The ad behavior you are objecting to is based on the version that the client is using, not the server. I guarantee you that almost 100% of the people that have played your game were using BYOND 514 or better.

The only thing you are saving your players from is over a decade of bug fixes, performance improvements, and new features.


Your reasons are bad. If you'd knock the planet-sized chip off your shoulder, maybe there'd be a chance you could reason your way out of this quite silly position you've locked yourself into.
Just wanted to say - I can confirm. If I run an outdated version of BYOND but players of my game are using a newer version. When they try to join the game it'll give them the window, join option, etc. based on the their version and not the one I am using.

So you're only helping yourself by not seeing ads when you join the games you play I guess