My map desyncs as soon as some one...

Homer

New Member
Reaction score
2
My map keeps server splitting as soon as someone does the first toss. It splits into twos. Can anyone help me here?:banghead:

Heres the toss code
JASS:
function Trig_Toss_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A004'        
endfunction

function Toss_Unit_Group takes nothing returns boolean 
 if ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_ANCIENT) == true ) then  
 return false 
 endif 
 if IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) then 
 return false 
 elseif IsUnitType(GetFilterUnit(), UNIT_TYPE_FLYING) then 
 return false 
 elseif GetFilterUnit() == GetSpellAbilityUnit() then 
 return false 
 elseif IsUnitDeadBJ(GetFilterUnit()) then 
 return false 
 endif 
return true
endfunction

function Toss_Destroy_Trees takes nothing returns nothing
    call KillDestructable( GetEnumDestructable() )
endfunction

function TossFX takes nothing returns nothing
local effect f= bj_lastCreatedEffect
call TriggerSleepAction(0.4)
call DestroyEffect(f)
set f=null
endfunction

function Toss_Movement takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit u=GetHandleUnit(t,"t")
local real b=GetHandleReal(t,"r")
local real n=GetHandleReal(t,"n")
local real d=GetHandleReal(t,"d")
local location l=GetHandleLocation(t,"l")
local real x=-d+(d*(b/50))
local location m=PolarProjectionBJ(l,x,n)
local real y=((b-25)*(b-25))
call SetUnitPositionLoc(u,m)
call SetUnitFlyHeight( u, ( 775-y ) , 10000.00 )
if GetRandomInt(1,4)==2 then
call AddSpecialEffectTargetUnitBJ( "origin", u, "Abilities\\Spells\\Undead\\Cripple\\CrippleTarget.mdl" )
call TriggerExecute(gg_trg_DestroyFX)
endif
set b=b+1
call SetHandleReal(t,"r",b)
set t=null
set u=null
set b=0
set n=0
set d=0
set l=null
set x=0
call RemoveLocation(m)
set m=null
set y=0
endfunction

function Trig_Toss_Actions takes nothing returns nothing
local group g=CreateGroup()
local unit c=GetTriggerUnit()
local unit a=null
local location l=GetSpellTargetLoc()
local timer t=null
local real b=1
local real d=0
local real n=0
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),275,Condition(function Toss_Unit_Group))
set a=GroupPickRandomUnit(g)
call GroupClear(g)
if a!=null then    
    call SetUnitAnimationByIndex(c,4)
    call PauseUnitBJ( true, a )
    call SetUnitPathing( a, false )
    call SetUnitFacingToFaceLocTimed( a, l, 0 )
    call UnitAddAbilityBJ( 'A002', a )
    call UnitRemoveAbilityBJ( 'A002', a )    
    set t=CreateTimer()
    call SetHandleHandle(t,"t",a)
    call SetHandleReal(t,"r",b)    
    set d = DistanceBetweenPoints(GetUnitLoc(c), l)
    set n= AngleBetweenPoints(GetUnitLoc(c), l)
    call SetHandleReal(t,"d",d)
    call SetHandleReal(t,"n",n)
    call SetHandleHandle(t,"l",l)   
    call TimerStart(t,0.02,true,function Toss_Movement)
    call TriggerSleepAction(1.0)
    call RemoveLocation(l)
    set l=GetHandleLocation(t,"l")
    call RemoveLocation(l)
    call FlushHandleLocals(t)
    call PauseTimer(t)
    call DestroyTimer(t)
    call SetUnitFlyHeightBJ( a, GetUnitDefaultFlyHeight(a), 10000.00 )
    call PauseUnitBJ( false, a )
    call SetUnitPathing( a, true )    
    set l=GetUnitLoc(a)
    call DestroyEffect(AddSpellEffectByIdLoc('A0BZ', EFFECT_TYPE_TARGET, l))
    call TerrainDeformationRippleBJ( 0.2, true, l, 1.00, 300.00, 96.00, 1, 64.00 )
    call UnitDamageTargetBJ( c, a, 38.00 * I2R(GetUnitAbilityLevelSwapped('A004', c)) , ATTACK_TYPE_NORMAL, DAMAGE_TYPE_DEMOLITION )
    set g = GetUnitsInRangeOfLocAll(300.00, l)
    loop
        set a = FirstOfGroup(g)
        exitwhen a == null
        call GroupRemoveUnit(g,a)
        call UnitDamageTargetBJ( c, a, 75.00 * I2R(GetUnitAbilityLevelSwapped('A004', c)) , ATTACK_TYPE_NORMAL, DAMAGE_TYPE_DEMOLITION )     
    endloop
    call EnumDestructablesInCircleBJ( 300,l , function Toss_Destroy_Trees )
    call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",GetLocationX(l),GetLocationY(l)))
endif
call DestroyGroup(g)
set g=null
set c=null
set a=null
call RemoveLocation(l)
set l=null
set t=null
set b=0
set n=0
set d=0
endfunction

//===========================================================================
function InitTrig_Toss takes nothing returns nothing
    set gg_trg_Toss = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Toss, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Toss, Condition( function Trig_Toss_Conditions ) )
    call TriggerAddAction( gg_trg_Toss, function Trig_Toss_Actions )
endfunction
 

Attachments

  • toss.w3x
    49.9 KB · Views: 120

MurderMode

Giving new meaning to co-op... slowly
Reaction score
154
didn't look at your map but from my knowledge alot of the time server splits are due to game events that target a local player when it actually affects everyone ingame.
 

Sooda

Diversity enchants
Reaction score
318
Leaks doesn't cause server split. Disable half triggers, try map, if it doesn't cause server split anymore you found problematic trigger(s). If it does disable again half active triggers. Pin point faulty trigger and post trigger.
 

MurderMode

Giving new meaning to co-op... slowly
Reaction score
154
lol the problem with server split issues tho is that it's hard to find the fault thru a process of elimination... you'd have to start a multiplayer game with every test run.

Post up your triggers involved with the first toss so helpers can have a quick browse. U'll prolly get more luck with that
 

Homer

New Member
Reaction score
2
Here's the toss code, I did not write it, Emijir(i think) wrote it. And I'm almost 100% it splits as soon as one or 2 toss's go off.

JASS:
function Trig_Toss_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A004'        
endfunction

function Toss_Unit_Group takes nothing returns boolean 
 if ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_ANCIENT) == true ) then  
 return false 
 endif 
 if IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) then 
 return false 
 elseif IsUnitType(GetFilterUnit(), UNIT_TYPE_FLYING) then 
 return false 
 elseif GetFilterUnit() == GetSpellAbilityUnit() then 
 return false 
 elseif IsUnitDeadBJ(GetFilterUnit()) then 
 return false 
 endif 
return true
endfunction

function Toss_Destroy_Trees takes nothing returns nothing
    call KillDestructable( GetEnumDestructable() )
endfunction

function TossFX takes nothing returns nothing
local effect f= bj_lastCreatedEffect
call TriggerSleepAction(0.4)
call DestroyEffect(f)
set f=null
endfunction

function Toss_Movement takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit u=GetHandleUnit(t,"t")
local real b=GetHandleReal(t,"r")
local real n=GetHandleReal(t,"n")
local real d=GetHandleReal(t,"d")
local location l=GetHandleLocation(t,"l")
local real x=-d+(d*(b/50))
local location m=PolarProjectionBJ(l,x,n)
local real y=((b-25)*(b-25))
call SetUnitPositionLoc(u,m)
call SetUnitFlyHeight( u, ( 775-y ) , 10000.00 )
if GetRandomInt(1,4)==2 then
call AddSpecialEffectTargetUnitBJ( "origin", u, "Abilities\\Spells\\Undead\\Cripple\\CrippleTarget.mdl" )
call TriggerExecute(gg_trg_DestroyFX)
endif
set b=b+1
call SetHandleReal(t,"r",b)
set t=null
set u=null
set b=0
set n=0
set d=0
set l=null
set x=0
call RemoveLocation(m)
set m=null
set y=0
endfunction

function Trig_Toss_Actions takes nothing returns nothing
local group g=CreateGroup()
local unit c=GetTriggerUnit()
local unit a=null
local location l=GetSpellTargetLoc()
local timer t=null
local real b=1
local real d=0
local real n=0
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),275,Condition(function Toss_Unit_Group))
set a=GroupPickRandomUnit(g)
call GroupClear(g)
if a!=null then    
    call SetUnitAnimationByIndex(c,4)
    call PauseUnitBJ( true, a )
    call SetUnitPathing( a, false )
    call SetUnitFacingToFaceLocTimed( a, l, 0 )
    call UnitAddAbilityBJ( 'A002', a )
    call UnitRemoveAbilityBJ( 'A002', a )    
    set t=CreateTimer()
    call SetHandleHandle(t,"t",a)
    call SetHandleReal(t,"r",b)    
    set d = DistanceBetweenPoints(GetUnitLoc(c), l)
    set n= AngleBetweenPoints(GetUnitLoc(c), l)
    call SetHandleReal(t,"d",d)
    call SetHandleReal(t,"n",n)
    call SetHandleHandle(t,"l",l)   
    call TimerStart(t,0.02,true,function Toss_Movement)
    call TriggerSleepAction(1.0)
    call RemoveLocation(l)
    set l=GetHandleLocation(t,"l")
    call RemoveLocation(l)
    call FlushHandleLocals(t)
    call PauseTimer(t)
    call DestroyTimer(t)
    call SetUnitFlyHeightBJ( a, GetUnitDefaultFlyHeight(a), 10000.00 )
    call PauseUnitBJ( false, a )
    call SetUnitPathing( a, true )    
    set l=GetUnitLoc(a)
    call DestroyEffect(AddSpellEffectByIdLoc('A0BZ', EFFECT_TYPE_TARGET, l))
    call TerrainDeformationRippleBJ( 0.2, true, l, 1.00, 300.00, 96.00, 1, 64.00 )
    call UnitDamageTargetBJ( c, a, 38.00 * I2R(GetUnitAbilityLevelSwapped('A004', c)) , ATTACK_TYPE_NORMAL, DAMAGE_TYPE_DEMOLITION )
    set g = GetUnitsInRangeOfLocAll(300.00, l)
    loop
        set a = FirstOfGroup(g)
        exitwhen a == null
        call GroupRemoveUnit(g,a)
        call UnitDamageTargetBJ( c, a, 75.00 * I2R(GetUnitAbilityLevelSwapped('A004', c)) , ATTACK_TYPE_NORMAL, DAMAGE_TYPE_DEMOLITION )     
    endloop
    call EnumDestructablesInCircleBJ( 300,l , function Toss_Destroy_Trees )
    call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",GetLocationX(l),GetLocationY(l)))
endif
call DestroyGroup(g)
set g=null
set c=null
set a=null
call RemoveLocation(l)
set l=null
set t=null
set b=0
set n=0
set d=0
endfunction

//===========================================================================
function InitTrig_Toss takes nothing returns nothing
    set gg_trg_Toss = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Toss, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Toss, Condition( function Trig_Toss_Conditions ) )
    call TriggerAddAction( gg_trg_Toss, function Trig_Toss_Actions )
endfunction

function Trig_Toss_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A004'        
endfunction

function Toss_Unit_Group takes nothing returns boolean 
 if ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_ANCIENT) == true ) then  
 return false 
 endif 
 if IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) then 
 return false 
 elseif IsUnitType(GetFilterUnit(), UNIT_TYPE_FLYING) then 
 return false 
 elseif GetFilterUnit() == GetSpellAbilityUnit() then 
 return false 
 elseif IsUnitDeadBJ(GetFilterUnit()) then 
 return false 
 endif 
return true
endfunction

function Toss_Destroy_Trees takes nothing returns nothing
    call KillDestructable( GetEnumDestructable() )
endfunction

function TossFX takes nothing returns nothing
local effect f= bj_lastCreatedEffect
call TriggerSleepAction(0.4)
call DestroyEffect(f)
set f=null
endfunction

function Toss_Movement takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit u=GetHandleUnit(t,"t")
local real b=GetHandleReal(t,"r")
local real n=GetHandleReal(t,"n")
local real d=GetHandleReal(t,"d")
local location l=GetHandleLocation(t,"l")
local real x=-d+(d*(b/50))
local location m=PolarProjectionBJ(l,x,n)
local real y=((b-25)*(b-25))
call SetUnitPositionLoc(u,m)
call SetUnitFlyHeight( u, ( 775-y ) , 10000.00 )
if GetRandomInt(1,4)==2 then
call AddSpecialEffectTargetUnitBJ( "origin", u, "Abilities\\Spells\\Undead\\Cripple\\CrippleTarget.mdl" )
call TriggerExecute(gg_trg_DestroyFX)
endif
set b=b+1
call SetHandleReal(t,"r",b)
set t=null
set u=null
set b=0
set n=0
set d=0
set l=null
set x=0
call RemoveLocation(m)
set m=null
set y=0
endfunction

function Trig_Toss_Actions takes nothing returns nothing
local group g=CreateGroup()
local unit c=GetTriggerUnit()
local unit a=null
local location l=GetSpellTargetLoc()
local timer t=null
local real b=1
local real d=0
local real n=0
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),275,Condition(function Toss_Unit_Group))
set a=GroupPickRandomUnit(g)
call GroupClear(g)
if a!=null then    
    call SetUnitAnimationByIndex(c,4)
    call PauseUnitBJ( true, a )
    call SetUnitPathing( a, false )
    call SetUnitFacingToFaceLocTimed( a, l, 0 )
    call UnitAddAbilityBJ( 'A002', a )
    call UnitRemoveAbilityBJ( 'A002', a )    
    set t=CreateTimer()
    call SetHandleHandle(t,"t",a)
    call SetHandleReal(t,"r",b)    
    set d = DistanceBetweenPoints(GetUnitLoc(c), l)
    set n= AngleBetweenPoints(GetUnitLoc(c), l)
    call SetHandleReal(t,"d",d)
    call SetHandleReal(t,"n",n)
    call SetHandleHandle(t,"l",l)   
    call TimerStart(t,0.02,true,function Toss_Movement)
    call TriggerSleepAction(1.0)
    call RemoveLocation(l)
    set l=GetHandleLocation(t,"l")
    call RemoveLocation(l)
    call FlushHandleLocals(t)
    call PauseTimer(t)
    call DestroyTimer(t)
    call SetUnitFlyHeightBJ( a, GetUnitDefaultFlyHeight(a), 10000.00 )
    call PauseUnitBJ( false, a )
    call SetUnitPathing( a, true )    
    set l=GetUnitLoc(a)
    call DestroyEffect(AddSpellEffectByIdLoc('A0BZ', EFFECT_TYPE_TARGET, l))
    call TerrainDeformationRippleBJ( 0.2, true, l, 1.00, 300.00, 96.00, 1, 64.00 )
    call UnitDamageTargetBJ( c, a, 38.00 * I2R(GetUnitAbilityLevelSwapped('A004', c)) , ATTACK_TYPE_NORMAL, DAMAGE_TYPE_DEMOLITION )
    set g = GetUnitsInRangeOfLocAll(300.00, l)
    loop
        set a = FirstOfGroup(g)
        exitwhen a == null
        call GroupRemoveUnit(g,a)
        call UnitDamageTargetBJ( c, a, 75.00 * I2R(GetUnitAbilityLevelSwapped('A004', c)) , ATTACK_TYPE_NORMAL, DAMAGE_TYPE_DEMOLITION )     
    endloop
    call EnumDestructablesInCircleBJ( 300,l , function Toss_Destroy_Trees )
    call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",GetLocationX(l),GetLocationY(l)))
endif
call DestroyGroup(g)
set g=null
set c=null
set a=null
call RemoveLocation(l)
set l=null
set t=null
set b=0
set n=0
set d=0
endfunction

//===========================================================================
function InitTrig_Toss takes nothing returns nothing
    set gg_trg_Toss = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Toss, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Toss, Condition( function Trig_Toss_Conditions ) )
    call TriggerAddAction( gg_trg_Toss, function Trig_Toss_Actions )
endfunction
 

Sooda

Diversity enchants
Reaction score
318
By quick look at JASS I can say there isn't nothing which can cause desync. Error must be somewhere else.
If you are not sure, test and only use Toss ability and look what happens.

Are you using 'pan camera for player over x seconds' action because it can cause desyncs?
 

Homer

New Member
Reaction score
2
yeah i am. But through gui triggers how would that cause desync?

Heres the opening set with the pan.
JASS:
start
    Events
        Time - Elapsed game time is 0.01 seconds
    Conditions
    Actions
        Leaderboard - Create a leaderboard for (All players) titled Kills
        Set start[1] = Start1 <gen>
        Set start[2] = Start2 <gen>
        Set start[3] = Start3 <gen>
        Set start[4] = Start4 <gen>
        Set start[5] = Start5 <gen>
        Set start[6] = Start6 <gen>
        Set start[7] = Start7 <gen>
        Set start[8] = Start8 <gen>
        For each (Integer A) from 1 to 8, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Player((Integer A))) slot status) Equal to Is playing
                    Then - Actions
                        Visibility - Create an initially Enabled visibility modifier for (Player((Integer A))) emitting Visibility across Region 008 <gen>
                        Leaderboard - Add (Player((Integer A))) to (Last created leaderboard) with label (colors[(Integer A)] + ((Name of (Player((Integer A)))) + |r)) and value 0
                        Set temp_point = (Center of start[(Integer A)])
                        Unit - Create 1 Stone Giant for (Player((Integer A))) at temp_point facing Default building facing degrees
                        Unit - Add Toss  to (Triggering unit)
                        Set tiny[(Integer A)] = (Last created unit)
                        Custom script:   call RemoveLocation (udg_temp_point)
                        Unit - Pause (Last created unit)
                    Else - Actions
        Game - Display to (All players) the text: |c007777AAWelcome t...
        Wait 5.00 seconds
        Game - Display to (All players) the text: |c007777AAUse Tiny ...
        Wait 3.00 seconds
        Game - Display to (All players) the text: 3
        Sound - Play PeonRepair1 <gen>
        Wait 1.00 seconds
        Game - Display to (All players) the text: 2
        Sound - Play PeonRepair2 <gen>
        Wait 1.00 seconds
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                Set temp_point = (Center of start[(Integer A)])
                Camera - Pan camera for (Player((Integer A))) to temp_point over 1.00 seconds
                Custom script:   call RemoveLocation (udg_temp_point)
        Game - Display to (All players) the text: 1
        Sound - Play PeonRepair3 <gen>
        Wait 1.00 seconds
        Game - Display to (All players) the text: Start!
        Sound - Play EtherealHeavyHit3 <gen>
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                Unit - Unpause all units
                Selection - Select (Units owned by (Player((Integer A)))) for (Player((Integer A)))

Also, I tested (im not sure if it was with enough people, 4) w/o toss and no1 disconnected.
 

Sooda

Diversity enchants
Reaction score
318
To prevent desyncs in your map follow these guidlines:
phyrex1an said:
A) Don't create something for a local player
B) Don't destroy something for a local player
C) Don't null something for a local player
D) Don't generate a new random seed for a local player
E) For safety, don't use a wait.
How hard is that?

> w/ o

I guess it means 'without'? I have to search how to fix 'pan camera' action.

> Unit - Add Toss to (Triggering unit)

Should be 'last created unit' there isn't triggering unit.

EDIT:

Good news, I was wrong, other 'pan camera' action desynced:
Code:
Camera - Pan camera as necessary for Player 1 (Red) to (Center of (Playable map area)) over 0.50 seconds

EDIT2:

You have twice pasted JASS in post #6. Wild guess would be *HandleVariables' attachment system will cause desyncs because it is outdated and you rapidly create/ remove units (dummy units who doesn't decay) from game which cause handle ids corruption and desync.
If we only speak about 'Toss' trigger and presume everything else in your map is fine.
 

Homer

New Member
Reaction score
2
To prevent desyncs in your map follow these guidlines:


> w/ o

I guess it means 'without'? I have to search how to fix 'pan camera' action.

> Unit - Add Toss to (Triggering unit)

Should be 'last created unit' there isn't triggering unit.

w/o = without yeah. I'll also search that.

Also thanks for seeing the add toss thing, I forgot that i put that in there and your right it is suppose to be last created unit. I'm still pretty sure toss has something to do with the server split because it didnt occur with out toss enabled.

If one or two of u guys could hop on bnet maybe you could identify something im missing?

Edit: I read that using handles can be deadly, and the toss script uses a bunch. Let me post where the handles are defined.
Handles defined in game start up script
JASS:
// ===========================Damage Enemies System
function FilterIsEnemy takes nothing returns boolean
    return IsUnitEnemy(GetFilterUnit(), bj_groupEnumOwningPlayer)
endfunction

function DamageEnemiesArea takes unit whichUnit, real radius, real x, real y, real amount, boolean attack, boolean ranged, attacktype attackType, damagetype damageType, weapontype weaponType returns nothing
    local group g = CreateGroup()
    local boolexpr b = Condition(function FilterIsEnemy)
    local unit t
    set bj_groupEnumOwningPlayer = GetOwningPlayer(whichUnit)
    call GroupEnumUnitsInRange(g, x, y, radius, b)
    call DestroyBoolExpr(b)    
    loop
        set t = FirstOfGroup(g)
        exitwhen t == null
        call GroupRemoveUnit(g,t)
        call UnitDamageTarget(whichUnit,t,amount,attack, ranged,attackType,damageType,weaponType)
    endloop    
    call DestroyGroup(g)
    set g = null
    set b = null
endfunction
// ===========================









// ===========================Local Handle Vars   By: Kattana
function H2I takes handle h returns integer
    return h
    return 0
endfunction

// ===========================
function LocalVars takes nothing returns gamecache
    if udg_Cache == null then
               call FlushGameCache(InitGameCache("somename"))
               set udg_Cache = InitGameCache("somename")
    endif
    return udg_Cache
endfunction

function SetHandleHandle takes handle subject, string name, handle value returns nothing
    if value==null then
        call FlushStoredInteger(LocalVars(),I2S(H2I(subject)),name)
    else
        call StoreInteger(LocalVars(), I2S(H2I(subject)), name, H2I(value))
    endif
endfunction

function SetHandleInt takes handle subject, string name, integer value returns nothing
    if value==0 then
        call FlushStoredInteger(LocalVars(),I2S(H2I(subject)),name)
    else
        call StoreInteger(LocalVars(), I2S(H2I(subject)), name, value)
    endif
endfunction

function SetHandleBoolean takes handle subject, string name, boolean value returns nothing
    if value==false then
        call FlushStoredBoolean(LocalVars(),I2S(H2I(subject)),name)
    else
        call StoreBoolean(LocalVars(), I2S(H2I(subject)), name, value)
    endif
endfunction

function SetHandleReal takes handle subject, string name, real value returns nothing
    if value==0 then
        call FlushStoredReal(LocalVars(), I2S(H2I(subject)), name)
    else
        call StoreReal(LocalVars(), I2S(H2I(subject)), name, value)
    endif
endfunction

function SetHandleString takes handle subject, string name, string value returns nothing
    if value==null then
        call FlushStoredString(LocalVars(), I2S(H2I(subject)), name)
    else
        call StoreString(LocalVars(), I2S(H2I(subject)), name, value)
    endif
endfunction

function GetHandleHandle takes handle subject, string name returns handle
    return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
    return null
endfunction
function GetHandleInt takes handle subject, string name returns integer
    return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
endfunction
function GetHandleBoolean takes handle subject, string name returns boolean
    return GetStoredBoolean(LocalVars(), I2S(H2I(subject)), name)
endfunction
function GetHandleReal takes handle subject, string name returns real
    return GetStoredReal(LocalVars(), I2S(H2I(subject)), name)
endfunction
function GetHandleString takes handle subject, string name returns string
    return GetStoredString(LocalVars(), I2S(H2I(subject)), name)
endfunction

function GetHandleUnit takes handle subject, string name returns unit
    return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
    return null
endfunction
function GetHandleLocation takes handle subject, string name returns location
    return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
    return null
endfunction
function GetHandleTimer takes handle subject, string name returns timer
    return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
    return null
endfunction
function GetHandleTrigger takes handle subject, string name returns trigger
    return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
    return null
endfunction
function GetHandleEffect takes handle subject, string name returns effect
    return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
    return null
endfunction
function GetHandleGroup takes handle subject, string name returns group
    return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
    return null
endfunction
function GetHandleLightning takes handle subject, string name returns lightning
    return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
    return null
endfunction
function GetHandleWidget takes handle subject, string name returns widget
    return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
    return null
endfunction

function FlushHandleLocals takes handle subject returns nothing
    call FlushStoredMission(LocalVars(), I2S(H2I(subject)) )
endfunction
// ===========================
 

Homer

New Member
Reaction score
2
Sorry to double post, however The server split lies in this trigger here, not sure whats causing it though.

JASS:
start
    Events
        Time - Elapsed game time is 0.01 seconds
    Conditions
    Actions
        Leaderboard - Create a leaderboard for (All players) titled Kills
        Set start[1] = Start1 <gen>
        Set start[2] = Start2 <gen>
        Set start[3] = Start3 <gen>
        Set start[4] = Start4 <gen>
        Set start[5] = Start5 <gen>
        Set start[6] = Start6 <gen>
        Set start[7] = Start7 <gen>
        Set start[8] = Start8 <gen>
        For each (Integer A) from 1 to 8, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Player((Integer A))) slot status) Equal to Is playing
                    Then - Actions
                        Visibility - Create an initially Enabled visibility modifier for (Player((Integer A))) emitting Visibility across Region 008 <gen>
                        Leaderboard - Add (Player((Integer A))) to (Last created leaderboard) with label (colors[(Integer A)] + ((Name of (Player((Integer A)))) + |r)) and value 0
                        Set temp_point = (Center of start[(Integer A)])
                        Unit - Create 1 Stone Giant for (Player((Integer A))) at temp_point facing Default building facing degrees
                        Unit - Add Toss  to (Triggering unit)
                        Set tiny[(Integer A)] = (Last created unit)
                        Custom script:   call RemoveLocation (udg_temp_point)
                        Unit - Pause (Last created unit)
                    Else - Actions
        Game - Display to (All players) the text: |c007777AAWelcome t...
        Wait 5.00 seconds
        Game - Display to (All players) the text: |c007777AAUse Tiny ...
        Wait 3.00 seconds
        Game - Display to (All players) the text: 3
        Sound - Play PeonRepair1 <gen>
        Wait 1.00 seconds
        Game - Display to (All players) the text: 2
        Sound - Play PeonRepair2 <gen>
        Wait 1.00 seconds
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                Set temp_point = (Center of start[(Integer A)])
                Camera - Pan camera for (Player((Integer A))) to temp_point over 1.00 seconds
                Custom script:   call RemoveLocation (udg_temp_point)
        Game - Display to (All players) the text: 1
        Sound - Play PeonRepair3 <gen>
        Wait 1.00 seconds
        Game - Display to (All players) the text: Start!
        Sound - Play EtherealHeavyHit3 <gen>
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                Unit - Unpause all units
                Selection - Select (Units owned by (Player((Integer A)))) for (Player((Integer A)))
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> The server split lies in this trigger here

That's the same trigger as before...
And it still uses "triggering unit" instead of "last created unit".

Anyway, what makes you think that would be it?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top