ID:146449
 
Ive coded this up and for some reason i get this error

   New()
AutoReboot()

proc
AutoReboot()
sleep(128000)
world << "<font face=\"Comic Sans MS\" size=1>\green World is Auto-Rebooting in 2 minutes!</font>"
sleep(1150)
world << "<font face=\"Comic Sans MS\" size=1>\green Auto-Rebooting in 5</font>"
sleep(10)
world << "<font face=\"Comic Sans MS\" size=1>\green Auto-Rebooting in 4</font>"
sleep(10)
world << "<font face=\"Comic Sans MS\" size=1>\green Auto-Rebooting in 3</font>"
sleep(10)
world << "<font face=\"Comic Sans MS\" size=1>\green Auto-Rebooting in 2</font>"
sleep(10)
world << "<font face=\"Comic Sans MS\" size=1>\green Auto-Rebooting in 1</font>"
sleep(10)
world.Reboot()


the error i get is Auto-reboot.dm:4:error: proc definition not allowed inside another proc

How can i fix this?
well.. the
proc
part is in the New() part, thus putting a proc in a proc
In response to SSJ4 Compufreak
To clarify that: Your indentation is wrong. Fix it.
Hate to break it to you, but 128000 ticks isn't two minutes.
12800/10=1280, which is 1280 seconds. 1280/60=21 and three tenths (one third). So, you're getting 21.33... out of 2?
[edit] Also, 1150 is -not- five seconds. 1150/10=115. 115 seconds, which is equal to a mininute and 55 seconds.
[edit*2]I don't even think you're creating this code now.
In response to Ol' Yeller
So how can i create it as to reboot every 12 Hours? or somthing
In response to Ol' Yeller
Ol' Yeller wrote:
Hate to break it to you, but 128000 ticks isn't two minutes.
12800/10=1280, which is 1280 seconds. 1280/60=21 and three tenths (one third). So, you're getting 21.33... out of 2?
[edit] Also, 1150 is -not- five seconds. 1150/10=115. 115 seconds, which is equal to a mininute and 55 seconds.
[edit*2]I don't even think you're creating this code now.

Hate to break it to you, but 128000 ticks pass before it says the world will reboot in two minutes.
In response to Ol' Yeller
Redo your calculations. 128000 ticks is 3.5555... hours, and the other ones are what he wants. He wants 1 minute 55 seconds between "2 minutes remaining" and "5 seconds remaining".

Govegtos, 12 hours is 12*60*60*10 = 432000 ticks. And you should put spawn() before the call to AutoReboot(), because it's not a good idea to prevent world/New() from returning.