away()
var/J
if(!away)
J=input("[usr] is away...","Your Away Message") as null|text
if(J&&ckey(J))
awaymessage=trim(html_encode(J))
away=1
world<<"[usr] is away ... <b>[trim(html_encode(awaymessage))]</b>"
return
else
usr << "Please input an away message."
if(away) {away=0;world<<"<b>[usr] is back</b>."}
ID:146061
Sep 27 2005, 3:58 pm (Edited on Sep 28 2005, 5:43 am)
|
|
Fixed the away code, simply.
|
In response to CaptFalcon33035
|
|
I already fixed that problem(simple switch() statement for the second alert() - Audero), but I fail to see how I put usr anywhere in it. [Edit] Oh, I see it now. Slipped right by me completely.
"Use a while proc instead of calling a proc all over again. Also, you've usr abused a bit, and on one of the if() statements, you called the proc and then asked if the guy wanted to use his key or call the proc, so that would cause te procs to get intertwind with each others, drowning the user in input and alerts until all of the procs were completed." Now, on this last part, I made an alert with two options. Use the key as a name "Yes", or go back to the beginning of MakeGuy() "Go Back". If /he chose Yes, it gave /him /his name as /his key, and told the world /he logged in. If /he chose "Go Back", I had it to where it would call MakeGuy() and return, thus stopping the whole thing after. |
Use a while proc instead of calling a proc all over again. Also, you've usr abused a bit, and on one of the if() statements, you called the proc and then asked if the guy wanted to use his key or call the proc, so that would cause te procs to get intertwind with each others, drowning the user in input and alerts until all of the procs were completed.