GetLocalPlayer Disconnects

cleeezzz

The Undead Ranger.
Reaction score
268
Okay so my problem is that i tested my map and 3 people dc'ed all at one time, should i be worried that it is a getlocalplayer error? but that was 3 out of 12 people, do GetLocalPlayer disconnects D/C all players? or was 3 people at once a sign? (or just laggy internet)?
 

cleeezzz

The Undead Ranger.
Reaction score
268
i know how to use it, but i might have messed up somewhere, the 3 people disconnecting, is that a sign of getlocalplayer desyncs or just laggy internet??

remember that not ALL players disconnect only 3 out of 12
 

saw792

Is known to say things. That is all.
Reaction score
280
Can you narrow down what happens when they disconnect? Spell cast, event, anything?
 

cleeezzz

The Undead Ranger.
Reaction score
268
nope, completely random as far as i can tell.

Ok so ive experienced crashing twice in my game but i do not notice anything special as it happens which means, i do not know the cause of the error. is there a faster way to find out what happened other than going through all the code (which still cant guarantee finding it)
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
So you don't know what's causing it, but it's a flaw in one of your triggers. However, you want us to try to narrow it down for you?

Try looking in some of your triggers. Infinite loops are usually an easy place to start looking.
 

Joker(Div)

Always Here..
Reaction score
86
Crash? I thought you said Disconnect. It gets saved on your LastReplay doesn't it? Maybe the new autoreplay feature saves it.
 

cleeezzz

The Undead Ranger.
Reaction score
268
heh.. i get both. 1 game, 3 people disconnected, the next, it crashed.

>Maybe the new autoreplay feature saves it.
not crashed games
 

cleeezzz

The Undead Ranger.
Reaction score
268
heres my trigger with the most getlocalplayer

is there any problem with it?

JASS:
scope KD initializer Init

globals
    private integer c = 0
endglobals

struct KDS
    //! runtextmacro PUI()
    timer t
    player p
    method onDestroy takes nothing returns nothing
        set .p = null
        call ReleaseTimer(.t)
        set .t = null
    endmethod
endstruct

private function Conditions takes nothing returns boolean
    return GetUnitPointValue(GetTriggerUnit()) == 100
endfunction

private function Add takes nothing returns nothing
    set c = c + Kills[GetPlayerId(GetEnumPlayer())]
endfunction

private function End takes nothing returns nothing
    local KDS d = GetCSData(GetExpiredTimer())
    set MKCount[GetPlayerId(d.p)] = 0
    call d.release()
endfunction

private function Actions takes nothing returns nothing
    local multiboarditem mbi = null
    local integer kid = GetPlayerId(GetOwningPlayer(GetKillingUnit()))
    local integer did = GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
    local integer bounty = 0
    local integer i = 0
    local KDS d 
    if (GetPlayerSlotState(GetOwningPlayer(GetTriggerUnit())) == PLAYER_SLOT_STATE_PLAYING or GetPlayerSlotState(GetOwningPlayer(GetTriggerUnit())) == PLAYER_SLOT_STATE_EMPTY) and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO) and GetUnitPointValue(GetTriggerUnit()) == 100 then
        if GetPlayerSlotState(GetOwningPlayer(GetKillingUnit())) == PLAYER_SLOT_STATE_PLAYING or GetPlayerSlotState(GetOwningPlayer(GetKillingUnit())) == PLAYER_SLOT_STATE_EMPTY then   
            set Deaths[did] = ( Deaths[did] + 1 )
            set TDeaths[did] = ( TDeaths[did] + 1 )
            set mbi = MultiboardGetItem(Norm_MB, spots[did], 2)
            call MultiboardSetItemValue(mbi, I2S(Deaths[did]) )
            call MultiboardReleaseItem(mbi)
            set mbi = MultiboardGetItem(Stat_MB[did], 5, 1)
            call MultiboardSetItemValue(mbi, I2S(Deaths[did]) )
            call MultiboardReleaseItem(mbi)
            set mbi = MultiboardGetItem(Stat_MB[did], 7, 1)
            call MultiboardSetItemValue(mbi, I2S(TDeaths[did]) )
            call MultiboardReleaseItem(mbi)
            set Kills[kid] = Kills[kid] + 1
            set TKills[kid] = TKills[kid] + 1
            set mbi = MultiboardGetItem(Norm_MB, spots[kid], 1)
            call MultiboardSetItemValue( mbi, I2S(Kills[kid]) )
            call MultiboardReleaseItem(mbi)
            set mbi = MultiboardGetItem(Stat_MB[kid], 4, 1)
            call MultiboardSetItemValue( mbi, I2S(Kills[kid]) )
            call MultiboardReleaseItem(mbi)
            set mbi = MultiboardGetItem(Stat_MB[kid], 6, 1)
            call MultiboardSetItemValue( mbi, I2S(TKills[kid]) )
            call MultiboardReleaseItem(mbi)
            
            if GameMode1[1] == false then
                if GameMode1[2] == true then
                    set i = 1
                    loop
                        exitwhen i == 7
                        set c = 0
                        call ForForce(Teams<i>, function Add)
                        set mbi = MultiboardGetItem(Team_MB, i, 1)
                        call MultiboardSetItemValue( mbi, I2S(c))
                        call MultiboardReleaseItem(mbi)
                        set mbi = null
                        set i = i + 1
                    endloop
                elseif GameMode1[3] == true then
                    set i = 1
                    loop
                        exitwhen i == 5
                        set c = 0
                        call ForForce(Teams<i>, function Add)
                        set mbi = MultiboardGetItem(Team_MB, i, 1)
                        call MultiboardSetItemValue( mbi, I2S(c))
                        call MultiboardReleaseItem(mbi)
                        set mbi = null
                        set i = i + 1
                    endloop
                elseif GameMode1[4] == true then
                    set i = 1
                    loop
                        exitwhen i == 4
                        set c = 0
                        call ForForce(Teams<i>, function Add)
                        set mbi = MultiboardGetItem(Team_MB, i, 1)
                        call MultiboardSetItemValue( mbi, I2S(c))
                        call MultiboardReleaseItem(mbi)
                        set mbi = null
                        set i = i + 1
                    endloop
                elseif GameMode1[5] == true then
                    set i = 1
                    loop
                        exitwhen i == 3
                        set c = 0
                        call ForForce(Teams<i>, function Add)
                        set mbi = MultiboardGetItem(Team_MB, i, 1)
                        call MultiboardSetItemValue( mbi, I2S(c))
                        call MultiboardReleaseItem(mbi)
                        set mbi = null
                        set i = i + 1
                    endloop
                endif
            endif
            set GameKills = GameKills + 1
            if (IsPlayerInForce(GetLocalPlayer(), bj_FORCE_ALL_PLAYERS)) then
                call DisplayTextToPlayer(GetLocalPlayer(), 0, 0,  PlayerColors[GetPlayerId(GetOwningPlayer(GetDyingUnit()))] + GetPlayerName(GetOwningPlayer(GetDyingUnit())) + &quot;|r&quot; + &quot; has been pwned by &quot; + PlayerColors[GetPlayerId(GetOwningPlayer(GetKillingUnit()))] + GetPlayerName(GetOwningPlayer(GetKillingUnit())) + &quot;|r&quot; + &quot; for &quot; + &quot;|cffffcc00&quot; + &quot;5&quot; + &quot; gold!&quot; + &quot;|r&quot;)
            endif
            call SetPlayerState(GetOwningPlayer(GetKillingUnit()), PLAYER_STATE_RESOURCE_GOLD, GetPlayerState(GetOwningPlayer(GetKillingUnit()), PLAYER_STATE_RESOURCE_GOLD) + 5 )
            if GameKills == 1 then
                call StartSound( gg_snd_FirstBlood )
                if (IsPlayerInForce(GetLocalPlayer(), bj_FORCE_ALL_PLAYERS)) then
                    call DisplayTextToPlayer(GetLocalPlayer(), 0, 0,  PlayerColors[GetPlayerId(GetOwningPlayer(GetKillingUnit()))] + GetPlayerName(GetOwningPlayer(GetKillingUnit())) + &quot;|r&quot; + &quot; has received |c00FF0000FIRST BLOOD!!|r |cffffcc00+5 gold!|r&quot;)                
                endif
                call SetPlayerState(GetOwningPlayer(GetKillingUnit()), PLAYER_STATE_RESOURCE_GOLD, GetPlayerState(GetOwningPlayer(GetKillingUnit()), PLAYER_STATE_RESOURCE_GOLD) + 5 )
            endif     
            if GetLocalPlayer() == GetOwningPlayer(GetKillingUnit()) then
                call MultiboardSetTitleText(Norm_MB, &quot;|cffffcc00Archer Wars|r &quot; + &quot;|c0000FF00&quot; + I2S(Kills[kid]) + &quot;|r&quot; + &quot;|cffffcc00/|r&quot; + &quot;|c00FF0000&quot; + I2S(Deaths[kid]) + &quot;|r&quot;)
            endif
            if Team_MB != null then
                if GetLocalPlayer() == GetOwningPlayer(GetKillingUnit()) then
                    call MultiboardSetTitleText(Team_MB, &quot;|cffffcc00Archer Wars|r &quot; + &quot;|c0000FF00&quot; + I2S(Kills[kid]) + &quot;|r&quot; + &quot;|cffffcc00/|r&quot; + &quot;|c00FF0000&quot; + I2S(Deaths[kid]) + &quot;|r&quot;)
                endif
            endif
            set i = 0
            loop
                exitwhen i == 12
                if Stat_MB<i> != null then
                    if GetLocalPlayer() == GetOwningPlayer(GetKillingUnit()) then
                        call MultiboardSetTitleText(Stat_MB<i>, &quot;|cffffcc00Archer Wars|r &quot; + &quot;|c0000FF00&quot; + I2S(Kills[kid]) + &quot;|r&quot; + &quot;|cffffcc00/|r&quot; + &quot;|c00FF0000&quot; + I2S(Deaths[kid]) + &quot;|r&quot;)
                    endif
                endif
                set i = i + 1
            endloop        
            if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) then
                call MultiboardSetTitleText(Norm_MB, &quot;|cffffcc00Archer Wars|r &quot; + &quot;|c0000FF00&quot; + I2S(Kills[did]) + &quot;|r&quot; + &quot;|cffffcc00/|r&quot; + &quot;|c00FF0000&quot; + I2S(Deaths[did]) + &quot;|r&quot;)
            endif
            if Team_MB != null then
                if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) then
                    call MultiboardSetTitleText(Team_MB, &quot;|cffffcc00Archer Wars|r &quot; + &quot;|c0000FF00&quot; + I2S(Kills[did]) + &quot;|r&quot; + &quot;|cffffcc00/|r&quot; + &quot;|c00FF0000&quot; + I2S(Deaths[did]) + &quot;|r&quot;)
                endif
            endif
            set i = 0
            loop
                exitwhen i == 12
                if Stat_MB<i> != null then
                    if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) then
                        call MultiboardSetTitleText(Stat_MB<i>,&quot;|cffffcc00Archer Wars|r &quot; + &quot;|c0000FF00&quot; + I2S(Kills[did]) + &quot;|r&quot; + &quot;|cffffcc00/|r&quot; + &quot;|c00FF0000&quot; + I2S(Deaths[did]) + &quot;|r&quot;)
                    endif
                endif
                set i = i + 1
            endloop 
            if SpreeCount[did] &gt; 3 then
                if SpreeCount[did] &gt; 10 then
                    set SpreeCount[did] = 10
                endif
                if GodlikeCount[did] &gt; 0 then
                    set bounty = SpreeEndGold[SpreeCount[did]] + (7 * (GodlikeCount[did] - 1))
                else
                    set bounty = SpreeEndGold[SpreeCount[did]]
                endif
                if (IsPlayerInForce(GetLocalPlayer(), bj_FORCE_ALL_PLAYERS)) then
                    call DisplayTextToPlayer( GetLocalPlayer(),0,0, PlayerColors[did] + GetPlayerName(GetOwningPlayer(GetDyingUnit())) + &quot;|r&quot; + &quot;&#039;s &quot; + SpreeEndAnnounce[SpreeCount[did]] + &quot; has been ended by &quot; + PlayerColors[kid] + GetPlayerName(GetOwningPlayer(GetKillingUnit())) + &quot;|r&quot; + &quot; |cffffcc00+&quot; + I2S(bounty) + &quot; gold!|r&quot; )
                endif
                call SetPlayerState(GetOwningPlayer(GetKillingUnit()), PLAYER_STATE_RESOURCE_GOLD, GetPlayerState(GetOwningPlayer(GetKillingUnit()), PLAYER_STATE_RESOURCE_GOLD) + bounty )
                call DestroyEffect(SpreeSFX[did])
            endif
            set SpreeCount[did] = 0
            set GodlikeCount[did] = 0
            set MKCount[did] = 0
            set SpreeCount[kid] = SpreeCount[kid] + 1
            if SpreeCount[kid] &gt; 10 then
                set SpreeCount[kid] = 10    
            endif
            if SpreeCount[kid] &gt; 3 then
                call StartSound(SpreeSound[SpreeCount[kid]] )
                call SetPlayerState(GetOwningPlayer(GetKillingUnit()), PLAYER_STATE_RESOURCE_GOLD, GetPlayerState(GetOwningPlayer(GetKillingUnit()), PLAYER_STATE_RESOURCE_GOLD) + SpreeGold[SpreeCount[kid]] )
                if SpreeCount[kid] == 4 then
                    set SpreeSFX[kid] = AddSpecialEffectTarget( &quot;Abilities\\Spells\\Items\\HealingSalve\\HealingSalveTarget.mdl&quot;, Hero[kid], &quot;origin&quot;  )
                endif
                if SpreeCount[kid] == 10 then
                    set GodlikeCount[kid] = GodlikeCount[kid] + 1 
                endif
                if GodlikeCount[kid] &gt; 0 then
                    set bounty = SpreeEndGold[SpreeCount[kid]] + (7 * (GodlikeCount[kid] - 1))
                else
                    set bounty = SpreeEndGold[SpreeCount[kid]]
                endif
                if IsPlayerInForce(GetLocalPlayer(),bj_FORCE_ALL_PLAYERS) then
                    call DisplayTimedTextToPlayer( GetLocalPlayer(), 0,0,10.00, PlayerColors[kid] + GetPlayerName(GetOwningPlayer(GetKillingUnit())) + &quot;|r&quot;  + SpreeAnnounce[SpreeCount[kid]] + &quot; |cffffcc00(&quot; + I2S(bounty) + &quot; Bounty)|r&quot;)
                endif
            endif
            set d = KDS[Hero[kid]]
            set MKCount[kid] = MKCount[kid] + 1
            if d == 0 then
                call d.create()
                set KDS[Hero[kid]] = d
                set d.t = NewTimer()
                set d.p = GetOwningPlayer(GetKillingUnit())
            else
                call PauseTimer(d.t)
            endif
            call TimerStart(d.t,1,false,function End)
            call SetCSData(d.t,d)
            if MKCount[kid] &gt; 3 then
                set MKCount[kid] = 3
            endif
            if MKCount[kid] &gt; 1 then
                call StartSound(MKSound[MKCount[kid]] )
                call SetPlayerState(GetOwningPlayer(GetKillingUnit()), PLAYER_STATE_RESOURCE_GOLD, GetPlayerState(GetOwningPlayer(GetKillingUnit()), PLAYER_STATE_RESOURCE_GOLD) + MKGold[MKCount[kid]] )
                if IsPlayerInForce(GetLocalPlayer(),bj_FORCE_ALL_PLAYERS) then
                    call DisplayTimedTextToPlayer( GetLocalPlayer(), 0,0,10.00, PlayerColors[kid] + GetPlayerName(GetOwningPlayer(GetKillingUnit())) + &quot;|r&quot;  + MKAnnounce[MKCount[kid]])
                endif
            endif
            set i = 0
            loop
                exitwhen i == 12
                if TKills[GetPlayerId(GetOwningPlayer(GetKillingUnit()))] == RankKills<i> then
                    call SetPlayerName( GetOwningPlayer(GetKillingUnit()), ( PlayerName[GetPlayerId(GetOwningPlayer(GetKillingUnit()))] + Rank<i> ) )
                    if IsPlayerInForce(GetLocalPlayer(), bj_FORCE_ALL_PLAYERS) then
                        call DisplayTextToPlayer( GetLocalPlayer(),0,0, PlayerColors[GetPlayerId(GetOwningPlayer(GetKillingUnit()))] + PlayerName[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]  + &quot;|r has ranked up to a(n)&quot; + &quot;|cffffcc00&quot; + Rank<i> + &quot;|r&quot; )
                    endif
                    set mbi = MultiboardGetItem(Stat_MB[GetPlayerId(GetOwningPlayer(GetKillingUnit()))], 1, 1)
                    call MultiboardSetItemValue(mbi, Rank<i>)
                    call MultiboardReleaseItem(mbi)
                    set mbi = null
                endif
                set i = i + 1
            endloop
        endif
    else
        set Deaths[did] = ( Deaths[did] + 1 )
        set TDeaths[did] = ( TDeaths[did] + 1 )
        set mbi = MultiboardGetItem(Norm_MB, spots[did], 2)
        call MultiboardSetItemValue(mbi, I2S(Deaths[did]) )
        call MultiboardReleaseItem(mbi)
        set mbi = null
        if (IsPlayerInForce(GetLocalPlayer(), bj_FORCE_ALL_PLAYERS)) then
            call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, PlayerColors[did] + GetPlayerName(GetOwningPlayer(GetDyingUnit())) + &quot;|r&quot;  + &quot; has died.&quot; )
        endif
        if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) then
            call MultiboardSetTitleText(Norm_MB, &quot;|cffffcc00Archer Wars|r &quot; + &quot;|c0000FF00&quot; + I2S(Kills[did]) + &quot;|r&quot; + &quot;|cffffcc00/|r&quot; + &quot;|c00FF0000&quot; + I2S(Deaths[did]) + &quot;|r&quot;)
        endif
        if Team_MB != null then
            if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) then
                call MultiboardSetTitleText(Team_MB, &quot;|cffffcc00Archer Wars|r &quot; + &quot;|c0000FF00&quot; + I2S(Kills[did]) + &quot;|r&quot; + &quot;|cffffcc00/|r&quot; + &quot;|c00FF0000&quot; + I2S(Deaths[did]) + &quot;|r&quot;)
            endif
        endif
        set i = 0
        loop
            exitwhen i == 12
            if Stat_MB<i> != null then
                if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) then
                    call MultiboardSetTitleText(Stat_MB<i>,&quot;|cffffcc00Archer Wars|r &quot; + &quot;|c0000FF00&quot; + I2S(Kills[did]) + &quot;|r&quot; + &quot;|cffffcc00/|r&quot; + &quot;|c00FF0000&quot; + I2S(Deaths[did]) + &quot;|r&quot;)
                endif
            endif
            set i = i + 1
        endloop 
    endif
     
    if DM == true then
        call TriggerExecute(DM_Trig[Mode])
    endif
    set mbi = null
endfunction

//===========================================================================
private function Init takes nothing returns nothing
    local trigger trig = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( trig, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddCondition( trig, Condition( function Conditions))
    call TriggerAddAction( trig, function Actions )
endfunction

endscope
</i></i></i></i></i></i></i></i></i></i></i></i></i></i>
 

Joker(Div)

Always Here..
Reaction score
86

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
The only two things is with displaying text and the multiboard. I'm just wondering is multiboard will desync on GetLocalPlayer().
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
If the multiboard doesn't, I'm pretty sure that won't.
 

cleeezzz

The Undead Ranger.
Reaction score
268
well thats mostly all my get local players.

i need more beta testers.. 6-7 more
 

T.s.e

Wish I was old and a little sentimental
Reaction score
133
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top