HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

TriggerSleepAction() Bugs?

01-11-2007, 02:17 AM#1
Rising_Dusk
Well, I have my most recent AotZ...
And I have a replay for it, that without a doubt shows me that the TriggerSleepAction(...) native was failing.

I have no idea why, but it happened.
And it started happening not 3 minutes into the game.

Are there any previously known instances of this happening or any known causes for this to happen?
I'd much appreciate it if someone could enlighten me here.
01-11-2007, 02:20 AM#2
Ryude
I've had triggers with TriggerSleepAction(25) only wait about 10 seconds. Sometimes it doesn't wait at all.
01-11-2007, 02:51 AM#3
Joker
I would use PolledWait() on longer durations.
01-11-2007, 02:52 AM#4
DioD
i checked sleep with timer it sleep random time + given time
01-11-2007, 03:33 AM#5
Rising_Dusk
No, this isn't about PolledWait() or that stuff.
The native was doing ABSOLUTELY nothing.
Period, that's it, nothing else.

I have two replays both revealing to me the exact same results.
And I have no idea why.
01-11-2007, 07:10 AM#6
Ryude
I would say use PolledWait then?
01-11-2007, 11:56 AM#7
Vexorian
I would mention http://www.wc3campaigns.net/showthread.php?t=90286 .

It seems that doing something wrong may cause a native to fail, so you better debug your code.
01-11-2007, 01:51 PM#8
Rising_Dusk
And if it happens in the first 3 minutes of gameplay...
I should probably check through the heroes that were constant between those games.

Also, as a side note:
Can third party programs influence bugs at all?
Like running a banlist in the background?
01-12-2007, 12:30 AM#9
Jazradel
Banlist wouldn't. If it actually changed anything Warden would probably pick it up as a hack.

Only third party program that actually influences Warcraft III would be Service Pack 2 for Windows XP.
01-12-2007, 01:42 AM#10
Ammorth
And what a horrible 3rd party program it is.

There are other though. The FPS mod uses a program to bind keys to function calls somehow (W, A, S, D, Space, etc.) Also map-hacks can alter WarCraftIII, but I doubt either of these are your problems.

Try copy your map and remove EVERY null. See if that fixes things. If it does, slowly add them back until the problem occurs again. You might have tried this already, but you never know.
01-12-2007, 03:39 PM#11
Captain Griffen
"without doubt" generally ends up as some stupid mistake.

Post the code.
01-12-2007, 03:44 PM#12
Rising_Dusk
Collapse JASS:
function Runes_Actions takes nothing returns nothing
    local integer num
    local integer temp
    local location RuneLoc
    local real RuneX
    local real RuneY
    if GetManipulatedItem() == udg_Runes[1] then
        set num = 1
    elseif GetManipulatedItem() == udg_Runes[2] then
        set num = 2
    else
        set num = 3
    endif
    call TriggerSleepAction(180)
    set temp = GetRandomInt(1, 7)
    set RuneLoc = GetRuneLoc(num)
    set RuneX = GetLocationX(RuneLoc)
    set RuneY = GetLocationY(RuneLoc)
    if temp == 1 then
        set udg_Runes[num] = CreateItem('I000', RuneX, RuneY)
    elseif temp == 2 then
        set udg_Runes[num] = CreateItem('I001', RuneX, RuneY)
    elseif temp == 3 then
        set udg_Runes[num] = CreateItem('I002', RuneX, RuneY)
    elseif temp == 4 then
        set udg_Runes[num] = CreateItem('I003', RuneX, RuneY)
    elseif temp == 5 then
        set udg_Runes[num] = CreateItem('I004', RuneX, RuneY)
    elseif temp == 6 then
        set udg_Runes[num] = CreateItem('I005', RuneX, RuneY)
    else
        set udg_Runes[num] = CreateItem('I006', RuneX, RuneY)
    endif
    call RemoveLocation(RuneLoc)
    set RuneLoc = null
endfunction
This wasn't the only thing that bugged, but everything else that did looks EXACTLY the same.
In both replays, the only part of the code that didn't happen was the TSA.

Seriously, I'm not making it up.
The code works, hell you can test it all in single player for yourself, or even multiplayer.
But in these instances TSA was not working and I don't know why.
01-12-2007, 06:38 PM#13
Chocobo
Do as said Vexorian : Debug your code.
01-12-2007, 07:39 PM#14
Ryude
I think there was someone that said TriggerSleepAction bugs when using long waits. 180 is pretty long.

Try using PolledWait, if that doesn't work you can always use a timer.