Element 'Time Out' not found

Jennifer Wren
21 Aug 2022, 22:56I have a script that plays a song but during game play it gives the error Element not found (timeout1) and the error Element mot found (timeout2).
What do these mean?
SetTimeout (1) {
play sound ("G.mp3", false, false)
}
SetTimeout (2) {
play sound ("F.mp3", false, false)
}
SetTimeout (3) {
play sound ("G.mp3", false, false)
}
SetTimeout (4) {
play sound ("E.mp3", false, false)
}
SetTimeout (5) {
play sound ("F.mp3", false, false)
}
SetTimeout (6) {
play sound ("D.mp3", false, false)
}
SetTimeout (7) {
play sound ("F.mp3", false, false)
}
SetTimeout (8) {
play sound ("E.mp3", false, false)
}
SetTimeout (10) {
play sound ("G.mp3", false, false)
}
SetTimeout (11) {
play sound ("G.mp3", true, false)
play sound ("A.mp3", false, false)
}
SetTimeout (12) {
play sound ("G.mp3", true, false)
play sound ("F.mp3", false, false)
}
SetTimeout (13) {
play sound ("E.mp3", true, false)
play sound ("D.mp3", false, false)
}
SetTimeout (14) {
play sound ("F.mp3", false, false)
}
SetTimeout (15) {
play sound ("G.mp3", false, false)
}
SetTimeout (16) {
play sound ("F.mp3", false, false)
}
SetTimeout (17) {
play sound ("E.mp3", false, false)
}
SetTimeout (19) {
play sound ("D.mp3", false, false)
}
SetTimeout (20) {
play sound ("D.mp3", true, false)
play sound ("E.mp3", false, false)
}
SetTimeout (21) {
play sound ("E.mp3", false, false)
}
SetTimeout (22) {
play sound ("E.mp3", true, false)
play sound ("D.mp3", false, false)
}
SetTimeout (23) {
play sound ("F.mp3", false, false)
}
SetTimeout (24) {
play sound ("G.mp3", false, false)
}
SetTimeout (25) {
play sound ("F.mp3", false, false)
}
SetTimeout (26) {
play sound ("E.mp3", false, false)
}
Pertex
22 Aug 2022, 10:00You really want to start so many timers in one function? Maybe Quest doesn't support that many timers?
Maybe something like this would be better:
SetTimeout (1) {
play sound ("G.mp3", false, false)
SetTimeout (1) {
play sound ("F.mp3", false, false)
SetTimeout (1) {
play sound ("G.mp3", false, false)
...
}
}
}
And if this is about an in-game puzzle: don't forget that some browsers don't play mp3
mrangel
22 Aug 2022, 16:25I don't think there's a limit to the number of timers you can have, but not sure.
Is it a Quest error, or a JS error?
Does it tell you which line the error occurred on?

Jennifer Wren
28 Aug 2022, 20:57They're no timers, not in the timer list, just a script to wait one second. My problem was, according to my interpretation of exactly when the error messages came up, that two sounds over one second long were to play within one second, twice, but that really made no sense to me, because the sounds that were to play first in the one second time, were less than one second long. I deleted those four notes. This does bring up one question, though. When using actual timers, that go off every so often without player actions triggering them each time, should we make sure there are no play sounds scripts that are set to hold the game until the sound has played through? Would the timer not just run the script, either from the beginning, or from the point where it froze, after the play sound, set to true, false for loop, was through playing?