I have something like this, are there any of those nested if statements in it? Is it something that can be avoided?
mob/proc/getname(mob/M)
var/Blah = input(Blah)
if(!loginname)
blah
return
if(loginname == "new")
Blah
if(!loginname)
Blah
if(fexists("Players/[ckey(loginname)]"))
Blah
return
if(newpassword=="Blah1" && confirmpassword=="Blah2")
if(loginname=="Zagreus"||"Deraxian"||"BobJr")
Blah
if(newpassword != confirmpassword)
Blah
getname(M)
return
if(newpassword==null)
Blah
getname(M)
return
Blah
return
else
if(fexists("Players/[ckey(loginname)]"))
Blah
if(correctpassword==passwordprompt)
if(F["Loaded"] == 1)
Blah
return
LoadMob(M, loginname)
return
else
Blah
getname(M)
return
else
Blah
getname(M)
return
I "blah"ed out all the irrelevant stuff because I really like my little login sequence, even if it may be ineffecient :) , and don't want to see it elsewhere. Plus I doubt anyone would read through this if it was 1500+ lines. :)
Would be nice though, real time updates of savefiles, no having to have a huge list of mob vars either.
And, I know loops are really bad, but just about all muds need some sort of timer. If I just had one little proc with a while(1) that started up in world.New() and did three for(mob/M in world)s and two for(obj/O in world)s and a single for(area/A in world) every 15 seconds or so. Just to serve as an all purpose timer and and update some misc. stuff I plan on, would that be bad?