I´m not sure but i think the while loop is endless!
"while count_time is higher or equal 0 add 1 to count_time"
After count_time get the value "1816" its still over 0. The While loop again waits 240 seconds and then adds 1 to count_time.
maybe you can write your code like that
Code:
var week = -60; //60 seconds make a week
var_nsave count_time = 1815; //starting year number
function Year_startup() //calculates year
{
while(count_time >= 0 && count_time <= 1816)
{
wait(week);
wait(week);
wait(week);
wait(week);
count_time += 1;
wait(1);
}
wait(-5);
bronze_pan.visible = on;
set_mouse(2);
}
Another possibility is that:
Code:
var week = -60; //60 seconds make a week
var_nsave count_time = 1815; //starting year number
function Year_startup() //calculates year
{
while(count_time >= 0)
{
wait(week);
wait(week);
wait(week);
wait(week);
count_time += 1;
if (count_time > 1816)
{
wait(-5);
bronze_pan.visible = on;
set_mouse(2);
// proc_kill(1);
}
wait(1);
{
}