Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

How can server-side lag reset a counter?

Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
11-04-2009 15:03
Total weirdness time.

I've made an item for someone that uses a timer event and a counter. When my toy is activated, it calls a timer event every 0.25 seconds that moves the prim, using llSetPos, and advances the counter until the counter == max (8, in fact). This works fine on my building platform, so I was rather surprised, as was my customer, who'd seen the thing working, when it didn't work on his rather laggy homestead sim.

I was even more surprised when I rezzed a copy on his sim, stuck in a lot of llOwnerSays to see what was happening, and found the counter was going 0-1-0-1. I took my item home, rezzed it there, and it counted as I would have expected: 0-1-2-3...up to 8. I wondered if it was because he's on the newer server version and I'm still on an older one, but that's not it -- I took my device to another sim and tested it there. Worked fine.

Anyone got any ideas what could be causing this? I can see why it would run slowly but not why it would lose count.
Fillo Farber
Registered User
Join date: 6 Jun 2004
Posts: 60
11-04-2009 20:30
I don't know the answer - mostly I feel bad that you didn't get a reply yet lol.

It sounds like whatever your script is doing to determine when to reset the counter is dependant on elapsed time - or you have some other timed event that is effecting it. I can't imagine how lag could reset a counter otherwise.

If nothing else, I bumped this up for you. Good luck!
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
11-04-2009 20:38
Weird indeed. Any chance we can see the script?
_____________________
Sick of sims locking up every time somebody TPs in? Vote for SVC-3895!!!
- Go here: https://jira.secondlife.com/browse/SVC-3895
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
11-05-2009 00:30
Sure. I'll post the relevant bit when I get home from work this evening. There's one possibility I want to check, too, which I think is highly improbable -- because it would mean something else was running far faster than it should do -- but could conceivably give me a clue as to where the problem lies.
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
A thought
11-05-2009 02:55
From: Innula Zenovka
I've made an item for someone that uses a timer event and a counter. When my toy is activated, it calls a timer event every 0.25 seconds that moves the prim, using llSetPos, and advances the counter until the counter == max (8, in fact). This works fine on my building platform, so I was rather surprised, as was my customer, who'd seen the thing working, when it didn't work on his rather laggy homestead sim.

I was even more surprised when I rezzed a copy on his sim, stuck in a lot of llOwnerSays to see what was happening, and found the counter was going 0-1-0-1. I took my item home, rezzed it there, and it counted as I would have expected: 0-1-2-3...up to 8.
My guess: When the counting starts the script gets stuck in waiting for some event that never happens (because of lag).
Each time the counting is reset the whole thing repeats itself.
I must empathize that I haven't read the script, so this is merely speculation:)
_____________________
From Studio Dora
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
11-11-2009 08:04
Thanks for all the suggestions, folks, and sorry for not posting the problematic script, but Dora's suggestion made me realise what I should be looking for, and it was only yesterday I was able to get hold of the customer to test my new version, revised in the light of what Dora said, and.. whoopee.. it works!

My function was, indeed, not getting time to complete before the timer reset everything. So I've reworked things to avoid that problem and it's now working, though rather slower than I had planned, but you can't have everything (particularly not on a very laggy homestead, it would seem).

Thanks so much for the help, folks.