[edit] rid of the goto(I am too newbish to use it anyways, I can't use it properly :P ((Please excuse any newbishness in this))
mob
host
verb
Set_Shutdown_Time()
set category = "Host"
var/A = input("Please insert amount of time(in minutes) until you want the server to go down.")as null|text
if(!A)
return
if(A == 0)
src << "The time must be greater than 0."
var/B = A / 600 / 2 //This line
var/C = B * 600 // And this line
sleep(B)
world << "The world is going down [C] minutes from now."
sleep(B)
world << "The world is shutting down in 10 seconds."
sleep(10)
world.Del()
return
Does anyone see anything wrong with my dividing?
Also, how would I make it see if A is not a number? so I can put an if() statement in there saying if it's not a number, then goto start:
Considering a handy cancel option would be a good idea, you should lose the loop altogether and just bail out if(!A), immediately after calling input().
Lummox JR