Lol, I've been programming for 22 years, but for some reason, it didn't occurr to me to use a nested loop! Ah well, didn't sleep much last night. Anyhow, mostly I needed to display text inside a script, so this solves all my problems! Thanks!
I had an idea of implementing a 24 hour clock into one of my stories, and each link uses a certain amount of time as the player does things. On location pages, it might give a different description of things according to wether it was day or night, and different things might happen at different times of the day, (like muggers in a dark alleyway in the middle of the night) so by checking what time it is, different text could be displayed on the same location page!
I don't know if anyone's done something like that yet, but if anyone's interested in putting a 24 hour clock into their stories, all I did was have a Global Link and Global Page script that has this:
IF %MINUTES >59 THEN
BEGIN
%MINUTES := (%MINUTES-60)
%HOURS := (%HOURS+1)
END
IF %HOURS >23 THEN
BEGIN
%HOURS := (%HOURS-24)
END
Then add MINUTES and HOURS variables, and when someone clicks on a link on a page, have it add to one of those variables to make time pass when they perform that action. You could do all sorts of things with this, like having a murder mystery that has to be solved by the strike of midnight, where every minute of your investigation counts, to having someone fall asleep if they've been awake for too many hours without resting, or you can even add weather cycles, so that every couple hours, it might change from clear skies to rain storms. Lots of possibilities :)
At the top of each page, I have a short bit of text that shows the time:
The time is %%HOURS%%:%%MINUTES%<%10%0%%%%MINUTES%%.
(Added <if minutes less than 10 print "0"> otherwise it might say things like 8:1 instead of 8:01)
Anyhow, just thought I'd post my clock idea in case someone else finds it useful too :) You could even do a similar thing to have it cycle through the days of the week as well, or whatever.