HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Really Wierd bug when i host a full house game

02-11-2006, 05:56 AM#1
The__Prophet
Ok, this bug is Wierd, and I Cannot explain why it occurs. Basically when people play a game and its a full house(12 players playing) one of my triggers doesnt work. Wierd part? The trigger has NOTHING to do with players. Here i'll post the trigger.
Collapse JASS:
function Trig_RandomInteger_Conditions takes nothing returns boolean
    return udg_Event == false and udg_QuestCounter < 7
endfunction

function Trig_RandomInteger_Actions takes nothing returns nothing
    local trigger array t
    local integer r
    local boolean b = false
    set t[1] = gg_trg_Civilian_Defense_Event
    set t[2] = gg_trg_Imperial_Supply_Event
    set t[3] = gg_trg_Meat_Wagon_Event
    set t[4] = gg_trg_Obelisk_Event
    set t[5] = gg_trg_Necro_Trig
    set t[6] = gg_trg_avatar_trig
    set t[7] = gg_trg_Hades_Stones_Event
    loop
        exitwhen b
        set r = GetRandomInt(1, 7)
        if udg_Picked[r] == false then
            set b = true
        endif
    endloop
    call TriggerExecute( t[r] )
    set udg_Picked[r] = true
    set b = false
    set udg_QuestCounter = udg_QuestCounter + 1
endfunction

//===========================================================================
function InitTrig_RandomInteger takes nothing returns nothing
    set gg_trg_RandomInteger = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_RandomInteger, 900.00)
    call TriggerAddCondition( gg_trg_RandomInteger, Condition( function Trig_RandomInteger_Conditions ) )
    call TriggerAddAction( gg_trg_RandomInteger, function Trig_RandomInteger_Actions )
endfunction

I could have a 5v5, a 6v5, a 1v0 any combination, and the trigger works. But during a 6v6 it doesnt. Any ideas as to why this is possibly happening?

Edit: Didnt see the Jass Tags.
02-11-2006, 06:30 AM#2
Jazradel
What are the other triggers?

Where is event/picked set and is quest changed anywere else?
02-11-2006, 06:39 AM#3
The__Prophet
That is the only trigger that runs the events. The only other triggers i could show you are the event triggers themselves, but theirs no point in that since i know they work. I know for a fact the trigger runs, cuase i put a BJDebugMsg in the beginning and end, and the first BJDebugMsg showed, but not the second one.
02-11-2006, 07:54 AM#4
ShadowDragon
Sounds like an infinite loop causing the thread to crash. Check to make sure that atleast one of the udg_Picked variables is false.
02-11-2006, 08:35 AM#5
The__Prophet
Thats the thing though, its not crashing. Just nothing happens.

Edit: oh I see what your saying. Let me test somthing really fast.
02-11-2006, 11:11 AM#6
Vexorian
look for any trigger that could set udg_Event to true
02-11-2006, 11:54 PM#7
The__Prophet
I removed udg_Event completly (since i put it there just to make sure an event didnt start until the current one was over, but i said to hell with that lol) Still didnt fix the problem. Its so fustrating, cuase I can't see ANY reason why the number of players would even remotly effect this trigger. Anyone willing to take a look at my map and see if they know what the problem is? PM me i guess, and i'll send you an unprotected version if i think i can trust you.

Also, is there anyway i could create a function array, so i can just directly call the main event function, without having to call the trigger Itself.
02-12-2006, 02:47 AM#8
Vexorian
fill the monster in with tons of BJDebugMsg and try to locate any execution point where it stops or something
02-12-2006, 05:16 AM#9
The__Prophet
Durr! Why didn't I think of that! Thanks for that suggestion.