ID:141906
 
Code:
var
seconds=00
minutes=00
hours=12
time_on=1
proc
Time()
while(time_on==1)
seconds++
if(seconds==60)
seconds=00
minutes++
if(minutes==60)
minutes=00
hours++
if(hours==25)
hours=01
else
sleep(8)
else
sleep(8)
else
sleep(8)


Problem description:
Hi, i designed that, like in about 3 1/2 seconds, and i tested it (via adding it to the status panel) and i added it to the login section of the Host so when he logs in, the time starts (once i get my problem done im going to work on saving and loading the time) anywho, when i add Time() to the beginning of the Host's login the time starts but any/all procs/EVERYTHING doesent work.

im thinking this may be because of the Time() Proc (Obviously) but why would it stop the other processes?

thanks for reading this even if you arent going to help.
~VolksBlade
For starters, you don't need to be using goto. That's the whole purpose of the while loop.
proc
Time()
while(time_on==1)
seconds++
if(seconds==60)
seconds=00
minutes++
if(minutes==60)
minutes=00
hours++
if(hours==25)
hours=01
sleep(8)

(edit)
Bah, either you changed it before I hit reply, or I'm going crazy. Still, you don't need all those elses. You can just have the one sleep happen regardless of all else.

Oh, and another thing, how do you call Time()?
In response to Loduwijk
yeah i did change it, sorry

and ill try it without the elses
In response to VolksBlade
ok i tried it without all the Else's and it works, but still didnt fix my problem

here is how i call Time()
mob
Login()
Time()
src<<browse("<STYLE>BODY {background: black; font-size: 12pt; font-family: Verdana; color: white}</STYLE>")
src.Choice=input("Welcome to Dark Moon, a game about Vampires Hybrids and Werewolfs. What would you like to do?","Login") in list("New","Load","Delete")
if(src.Choice=="New")
src.Cnew()
if(src.Choice=="Load")
src.Cload()
if(src.Choice=="Delete")
src.Cdelete()
In response to VolksBlade
Time() never returns, remember that it's an infinite loop. A purposeful infinite loop, but infinite nonetheless. Therefor, it never returns program control to Login(). Use spawn()
Login()
spawn()
Time()
...
In response to Loduwijk
Awesome It Works!

Thank You!