| Alright everyone, I'm having a serious issue when it comes to my Multiboard display trigger. Unlike the tutorials I saw, they all had a triggering player of some sort, while I just run this script every once in a while in my code.
This code is actually written in the GUI, and worked fine until I added the custom scripts at the bottom, which are the IF statements highlighted in red.
(If Someone could explain how to get the Trigger /Trigger thing to properly work I could try posting that to see if would help someone else understand. =\
Now, I have another trigger that initializes the Multiboards, and it runs into the same problem is this trigger, and since it's worked before, I don't think it's my GUI code itself, as when I try to run this I get some error, "Expected a Name"
Now, I've tried putting udg_Temp_Integer, which is a variable created in the GUI interface thing with the little box with the fancy yellow X in it, but instead of working it crashes the entire world editor when it checks to see if the script is valid apon turning the trigger back on. Help would be appreciated. =)
Trigger: Refresh Multiboard Events  Time - Every 5.00 seconds of game time Conditions Actions  For each (Integer Temp_Integer) from 1 to 2, do (Actions)   Loop - Actions    If (All Conditions are True) then do (Then Actions) else do (Else Actions)     Then - Actions      For each (Integer A) from 2 to ((Number of units in (Units owned by Player 1 (Red) matching (((Matching unit) is A Hero) Equal to True))) + 1), do (Actions)       Loop - Actions        Multiboard - Set the text for Multiboards_General[Temp_Integer] item in column 1, row (Integer A) to (Proper name of Unit_Generals_1[(Integer A)])        Multiboard - Set the text for Multiboards_General[Temp_Integer] item in column 2, row (Integer A) to (Name of Unit_Generals_1[(Integer A)])        Multiboard - Set the text for Multiboards_General[Temp_Integer] item in column 3, row (Integer A) to ((String(Unit_Group_1_Counter[(Integer A)])) + ( / + 12))        Multiboard - Set the text for Multiboards_General[Temp_Integer] item in column 4, row (Integer A) to (String((Level of Unit_Generals_1[(Integer A)])))        Multiboard - Set the width for Multiboards_General[Temp_Integer] item in column 1, row (Integer A) to 8.00% of the total screen width        Multiboard - Set the width for Multiboards_General[Temp_Integer] item in column 2, row (Integer A) to 12.00% of the total screen width        Multiboard - Set the width for Multiboards_General[Temp_Integer] item in column 3, row (Integer A) to 4.00% of the total screen width        Multiboard - Set the width for Multiboards_General[Temp_Integer] item in column 4, row (Integer A) to 2.00% of the total screen width        For each (Integer B) from 1 to 4, do (Actions)         Loop - Actions          Multiboard - Set the display style for Multiboards_General[Temp_Integer] item in column (Integer B), row 1 to Show text and Hide icons          Multiboard - Set the display style for Multiboards_General[Temp_Integer] item in column (Integer B), row (Integer A) to Show text and Hide icons     Else - Actions    If (All Conditions are True) then do (Then Actions) else do (Else Actions)     Then - Actions      For each (Integer A) from 2 to ((Number of units in (Units owned by Player 2 (Blue) matching (((Matching unit) is A Hero) Equal to True))) + 1), do (Actions)       Loop - Actions        Multiboard - Set the text for Multiboards_General[Temp_Integer] item in column 1, row (Integer A) to (Proper name of Unit_Generals_2[(Integer A)])        Multiboard - Set the text for Multiboards_General[Temp_Integer] item in column 2, row (Integer A) to (Name of Unit_Generals_2[(Integer A)])        Multiboard - Set the text for Multiboards_General[Temp_Integer] item in column 3, row (Integer A) to ((String(Unit_Group_2_Counter[(Integer A)])) + ( / + 12))        Multiboard - Set the text for Multiboards_General[Temp_Integer] item in column 4, row (Integer A) to (String((Level of Unit_Generals_2[(Integer A)])))        Multiboard - Set the width for Multiboards_General[Temp_Integer] item in column 1, row (Integer A) to 8.00% of the total screen width        Multiboard - Set the width for Multiboards_General[Temp_Integer] item in column 2, row (Integer A) to 12.00% of the total screen width        Multiboard - Set the width for Multiboards_General[Temp_Integer] item in column 3, row (Integer A) to 4.00% of the total screen width        Multiboard - Set the width for Multiboards_General[Temp_Integer] item in column 4, row (Integer A) to 2.00% of the total screen width        For each (Integer B) from 1 to 4, do (Actions)         Loop - Actions          Multiboard - Set the display style for Multiboards_General[Temp_Integer] item in column (Integer B), row 1 to Show text and Hide icons          Multiboard - Set the display style for Multiboards_General[Temp_Integer] item in column (Integer B), row (Integer A) to Show text and Hide icons     Else - Actions    Custom script: if( GetLocalPlayer() == ConvertedPlayer( Temp_Integer) ) then    Multiboard - Hide Multiboards_General[Temp_Integer]    Custom script: if( GetLocalPlayer() == ConvertedPlayer( Temp_Integer ) ) then    Multiboard - Show Multiboards_General[Temp_Integer]
 JASS: function Trig_Mutliboard_Error_Func001Func001Func001002001001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Mutliboard_Error_Func001Func001C takes nothing returns boolean
if ( not ( udg_Temp_Integer == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Mutliboard_Error_Func001Func002Func001002001001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Mutliboard_Error_Func001Func002C takes nothing returns boolean
if ( not ( udg_Temp_Integer == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Mutliboard_Error_Actions takes nothing returns nothing
set udg_Temp_Integer = 1
loop
exitwhen udg_Temp_Integer > 2
if ( Trig_Mutliboard_Error_Func001Func001C() ) then
set bj_forLoopAIndex = 2
set bj_forLoopAIndexEnd = ( CountUnitsInGroup(GetUnitsOfPlayerMatching(Player(0), Condition(function Trig_Mutliboard_Error_Func001Func001Func001002001001002))) + 1 )
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call MultiboardSetItemValueBJ( udg_Multiboards_General[udg_Temp_Integer], 1, GetForLoopIndexA(), GetHeroProperName(udg_Unit_Generals_1[GetForLoopIndexA()]) )
call MultiboardSetItemValueBJ( udg_Multiboards_General[udg_Temp_Integer], 2, GetForLoopIndexA(), GetUnitName(udg_Unit_Generals_1[GetForLoopIndexA()]) )
call MultiboardSetItemValueBJ( udg_Multiboards_General[udg_Temp_Integer], 3, GetForLoopIndexA(), ( I2S(udg_Unit_Group_1_Counter[GetForLoopIndexA()]) + ( " / " + "12" ) ) )
call MultiboardSetItemValueBJ( udg_Multiboards_General[udg_Temp_Integer], 4, GetForLoopIndexA(), I2S(GetUnitLevel(udg_Unit_Generals_1[GetForLoopIndexA()])) )
call MultiboardSetItemWidthBJ( udg_Multiboards_General[udg_Temp_Integer], 1, GetForLoopIndexA(), 8.00 )
call MultiboardSetItemWidthBJ( udg_Multiboards_General[udg_Temp_Integer], 2, GetForLoopIndexA(), 12.00 )
call MultiboardSetItemWidthBJ( udg_Multiboards_General[udg_Temp_Integer], 3, GetForLoopIndexA(), 4.00 )
call MultiboardSetItemWidthBJ( udg_Multiboards_General[udg_Temp_Integer], 4, GetForLoopIndexA(), 2.00 )
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 4
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
call MultiboardSetItemStyleBJ( udg_Multiboards_General[udg_Temp_Integer], GetForLoopIndexB(), 1, true, false )
call MultiboardSetItemStyleBJ( udg_Multiboards_General[udg_Temp_Integer], GetForLoopIndexB(), GetForLoopIndexA(), true, false )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
endif
if ( Trig_Mutliboard_Error_Func001Func002C() ) then
set bj_forLoopAIndex = 2
set bj_forLoopAIndexEnd = ( CountUnitsInGroup(GetUnitsOfPlayerMatching(Player(1), Condition(function Trig_Mutliboard_Error_Func001Func002Func001002001001002))) + 1 )
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call MultiboardSetItemValueBJ( udg_Multiboards_General[udg_Temp_Integer], 1, GetForLoopIndexA(), GetHeroProperName(udg_Unit_Generals_2[GetForLoopIndexA()]) )
call MultiboardSetItemValueBJ( udg_Multiboards_General[udg_Temp_Integer], 2, GetForLoopIndexA(), GetUnitName(udg_Unit_Generals_2[GetForLoopIndexA()]) )
call MultiboardSetItemValueBJ( udg_Multiboards_General[udg_Temp_Integer], 3, GetForLoopIndexA(), ( I2S(udg_Unit_Group_2_Counter[GetForLoopIndexA()]) + ( " / " + "12" ) ) )
call MultiboardSetItemValueBJ( udg_Multiboards_General[udg_Temp_Integer], 4, GetForLoopIndexA(), I2S(GetUnitLevel(udg_Unit_Generals_2[GetForLoopIndexA()])) )
call MultiboardSetItemWidthBJ( udg_Multiboards_General[udg_Temp_Integer], 1, GetForLoopIndexA(), 8.00 )
call MultiboardSetItemWidthBJ( udg_Multiboards_General[udg_Temp_Integer], 2, GetForLoopIndexA(), 12.00 )
call MultiboardSetItemWidthBJ( udg_Multiboards_General[udg_Temp_Integer], 3, GetForLoopIndexA(), 4.00 )
call MultiboardSetItemWidthBJ( udg_Multiboards_General[udg_Temp_Integer], 4, GetForLoopIndexA(), 2.00 )
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 4
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
call MultiboardSetItemStyleBJ( udg_Multiboards_General[udg_Temp_Integer], GetForLoopIndexB(), 1, true, false )
call MultiboardSetItemStyleBJ( udg_Multiboards_General[udg_Temp_Integer], GetForLoopIndexB(), GetForLoopIndexA(), true, false )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
endif
if( GetLocalPlayer() == ConvertedPlayer( Temp_Integer ) ) then
call MultiboardDisplayBJ( false, udg_Multiboards_General[udg_Temp_Integer] )
if( GetLocalPlayer() == ConvertedPlayer( Temp_Integer ) then
call MultiboardDisplayBJ( true, udg_Multiboards_General[udg_Temp_Integer] )
set udg_Temp_Integer = udg_Temp_Integer + 1
endloop
endfunction
function InitTrig_Mutliboard_Error takes nothing returns nothing
set gg_trg_Mutliboard_Error = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Mutliboard_Error, 5.00 )
call TriggerAddAction( gg_trg_Mutliboard_Error, function Trig_Mutliboard_Error_Actions )
endfunction
|