| 04-25-2009, 04:36 PM | #1 |
I was testing the MMD library for resistance against particular attacks, and I found that my TriggerSleepAction(10) calls were waiting less than second. Replacing them with PolledWait(10) fixed the problem, but now I'm curious as to what might have caused it. Here is example code: JASS:library L initializer run private function run takes nothing returns nothing call BJDebugMsg("sync") call SyncStoredInteger(InitGameCache("gc"), "", "") call BJDebugMsg("wait") call TriggerSleepAction(10.0) //doesn't wait anywhere NEAR 10 seconds call BJDebugMsg("done") endfunction endlibrary |
| 04-25-2009, 04:54 PM | #2 |
More info: - If this is done in a timer callback, the bug disappears. (can you not wait in timer callbacks?). Still works with trigger timer events, though. - Works in multiplayer, singleplayer, and replays - Doesn't bug without the sync call, a null game cache, SyncStoredString, SyncStoredReal - Bugs with SyncStoredInteger, SyncStoredUnit, SyncStoredBoolean |
