Event.Hook("ClientConnected", InSameFileHandler)

WyzcrakWyzcrak Pot Pie Aficionado Join Date: 2002-12-04 Member: 10447Forum Moderators, Constellation, NS2 Playtester, Squad Five Blue
<div class="IPBDescription">No errors, but no binding...</div>I'm very new to this. If anything I assert as fact in this post (or the referenced gist) is incorrect, please correct me.

My problem: I'm failing in my attempt to bind an event.

I have (hopefully not overly) simplified my code to the following: <a href="https://gist.github.com/3490180" target="_blank">https://gist.github.com/3490180</a>

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Starting from game_setup.xml:
Steps 1-3: Load files until I've loaded clientConnected.lua
Step 4   : call engine.lua's bindHandler
Step 5   : handle the "ClientConnected" event with the InSameFileHandler method<!--c2--></div><!--ec2-->
InSameFileHandler() never fires in Step 5. The Shared.Message("CCCC...") does fire (I do see it in my console)..

My console shows no errors from the Event.Hook line (to be clear: it shows no errors anywhere).

Why is Event.Hook not working (or showing an error) in my engine.lua?

Comments

  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    My initial thought is that event is the client side event for connections, you want ClientConnect for server side client connect events.
  • WyzcrakWyzcrak Pot Pie Aficionado Join Date: 2002-12-04 Member: 10447Forum Moderators, Constellation, NS2 Playtester, Squad Five Blue
    I later found other minor problems in the code, but your correction was key. Thank you.
Sign In or Register to comment.