Hey all,
Alrighty, so I'm running into a bit of a logical issue in my script. Basically, to make this as simple as possible to explain, I have a sub, alertCheck, that is called from many places in my script to scan for player death, certain system messages, and GM's. Let's say this is it:
set %jStart #jindex + 1
set %jTimeout #scnt2 + 5
while #scnt2 < %jTimeout
{
set %jEnd #jindex
if %jEnd >= %jStart
{
for %ji %jStart %jEnd
{
scanjournal %ji
if gm in #journal
set %gmDetected #true
}
set %jStart %jEnd + 1
}
}
My problem is this. Basically there are points where this sub is called, where there has been spam, and it's possible a flag could be on a line that is not #jindex + 1. It could be, say, 5 lines up due to the journal spam.
I thought this would be simple to account for, and I set %jStart to #jindex + 5 in the 2 applicable spots in the code, this did not work as I thought it would... no matter how long you give it to scan, apparently #jindex + [Anything other than 1] is an illegal statement.
Basically, is there any way to force the journal scan to start a few lines up? What I'm doing just seems to break it. Need some way of retro-scanning a few lines if it's possible.
Anyone have any ideas on what I might try? Thanks much