• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

register event disconnects my buddy

Status
Not open for further replies.
Level 4
Joined
Jan 20, 2011
Messages
65
hi , im makeing a map and when i test it with my buddy he gets disconnected
i deactivated and commented some things out and finally found out that he disconnectes because of the trigger register events
they disconnect him if i call them in init aswell as after 3 sec of game time

the triggers are created by physically makeing a new trigger
because i dont want to register it for every player i put them together at the init only for the playing players
so they all have incommon that they are for specific player

any ideas?

JASS:
        call TriggerRegisterPlayerKeyEventBJ( gg_trg_Left_Depress , Player(i), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
        call TriggerRegisterPlayerKeyEventBJ( gg_trg_Right_Depress , Player(i), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_RIGHT )
        call TriggerRegisterPlayerKeyEventBJ( gg_trg_Up_Depress , Player(i), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_UP )
        call TriggerRegisterPlayerKeyEventBJ( gg_trg_Down_Depress , Player(i), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_DOWN )

        call TriggerRegisterPlayerKeyEventBJ( gg_trg_Left_Release , Player(i), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_LEFT )
        call TriggerRegisterPlayerKeyEventBJ( gg_trg_Right_Release , Player(i), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_RIGHT )
        call TriggerRegisterPlayerKeyEventBJ( gg_trg_Up_Release , Player(i), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_UP )
        call TriggerRegisterPlayerKeyEventBJ( gg_trg_Down_Release , Player(i), bj_KEYEVENTTYPE_RELEASE, bj_KEYEVENTKEY_DOWN )

        call TriggerRegisterPlayerEventLeave( gg_trg_PlayerLeaves, Player(i) )
        call TriggerRegisterPlayerSelectionEventBJ( gg_trg_SelectionEvent, Player(i), true )
        call TriggerRegisterPlayerSelectionEventBJ( gg_trg_DeselectionEvent, Player(i), false )
 
Level 4
Joined
Jan 20, 2011
Messages
65
no man!! i know i am confused too , i dont use localplayer, it just disconnects, i found a problem for mac users, they supposed to get disconnected when u do something like this in the init (some function useing getlocalplayer even if it usualy doesnt disconnect), but my buddys dont use mac and it even disconnects when called somewhere else

it works when i comment the lines i posted up there out
 
Level 4
Joined
Jan 20, 2011
Messages
65
it might be the problem lol, i allready had situations in c++ with the quantum physics phenomenom, When you Dont look the Program CHANGES!!! (removeing a printf :D )

well i duno if i fixed it completly now one buddy doesnt disconnect, duno about the other, he seemd to be more attracted to desync

gave them their own loop and removed the bjs
also i realized that the newgen editor i was useing caused some problems
i switched back to the normal one, that might have fixed desync too

still gotta test with the other dude though..
 
it might be the problem lol, i allready had situations in c++ with the quantum physics phenomenom, When you Dont look the Program CHANGES!!! (removeing a printf :D )

well i duno if i fixed it completly now one buddy doesnt disconnect, duno about the other, he seemd to be more attracted to desync

gave them their own loop and removed the bjs
also i realized that the newgen editor i was useing caused some problems
i switched back to the normal one, that might have fixed desync too

still gotta test with the other dude though..

Be sure first that he doesn't have problems with his internet in general. :p Disconnects happen even in melee games, so it is sometimes just a freak occurrence or bad internet.
 
Status
Not open for further replies.
Top