MOO-cows Mailing List Archive
[Prev][Next][Index][Thread]
LPMOO HELP, please.
-
Date: Tue, 29 Aug 1995 11:42:43 PDT
-
From: cooey@server.uwindsor.ca (Tosh)
-
Content-Length: 990
-
Content-Transfer-Encoding: 7bit
-
Content-Type: text/plain; charset=US-ASCII
Ok, can someone 'splain this?
;for x in [1..100000] if (ticks_left() < 5000) suspend(10); else
notify(player, tostr(ticks_left())); endif endfor
This will spam me until x = 100000 and it won't suspend, tho' the ticks
are reset. the output looks like this:
.
.
.
5035
5004
29954
29346
.
.
.
and so one until it loops back again.
Now if I do this next thing I get a totally different result:
;for x in [1..100000] if (x == 15000) suspend(10); else
notify(player, tostr(ticks_left())); endif endfor
The output is:
spam
spam
spam
.
.
.
6032
5889
And here it suspends, allowing calls to @forked and allowing other tasks
to run.
Then it runs out of ticks.
So the problem seems to be suspend() and ticks_left() working together,
but what is going on here?
Tosh
--
| |##|## ||||| #|#|# |#|## ||||# #||#| ||#|# #|||| #|#|# #|||| ##|| |##|
This ^^^^ is my government barcode identifier. # = thick lines, | = thin
I don't make this stuff up. cooey@server.uwindsor.ca
Home |
Subject Index |
Thread Index