Event.Hook("ClientConnected", InSameFileHandler)
Wyzcrak
Pot Pie Aficionado Join Date: 2002-12-04 Member: 10447Forum Moderators, Constellation, NS2 Playtester, Squad Five Blue
in Modding
<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?
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