Keuvyn T. 3 Report post Posted December 17, 2016 Good night guys from PKO DEV, I am trying to add this function to my resource: Hook:AddPostHook("GetExp_PKM",Instance.PKM) However it is giving error: ./resource/InfernalAbyss/Instance_functions.lua:38: attempt to index global "Hook" <a nil value> How can I fix it?Note: I'm trying to add this map https://pkodev.net/index.php?/topic/1050-infernal-abyss/#comment-6676 Quote Share this post Link to post Share on other sites
Eviles 179 Report post Posted December 18, 2016 Hello. Do you have Hook.lua in your files? Most of new extension requires it and serialize.lua, you should load it on your files. Create a new text document paste these codes and save as Hook.lua, then load at start of files, eg: from NpcSdk.lua: http://pastebin.com/uKFZjKsY Quote Share this post Link to post Share on other sites
Shako 97 Report post Posted December 18, 2016 1 hour ago, Keuvyn T. said: Good night guys from PKO DEV, I am trying to add this function to my resource: Hook:AddPostHook("GetExp_PKM",Instance.PKM) However it is giving error: ./resource/InfernalAbyss/Instance_functions.lua:38: attempt to index global "Hook" <a nil value> How can I fix it?Note: I'm trying to add this map https://pkodev.net/index.php?/topic/1050-infernal-abyss/#comment-6676 Common problem if you load your extension before loading Hook.lua try to load Hook.lua before it in ur files Quote Sunny Go! Online pko.host Share this post Link to post Share on other sites
Keuvyn T. 3 Report post Posted December 18, 2016 @Satan, @Shako. I was able to fix the problem with your help. Thank you! Can you help me with this other problem with the map? Quote Share this post Link to post Share on other sites
kyleflow 35 Report post Posted November 17, 2023 On 12/18/2016 at 8:07 AM, Eviles said: Hello. Do you have Hook.lua in your files? Most of new extension requires it and serialize.lua, you should load it on your files. Create a new text document paste these codes and save as Hook.lua, then load at start of files, eg: from NpcSdk.lua: http://pastebin.com/uKFZjKsY How do u load files before other files load. Where the location of it. Quote Share this post Link to post Share on other sites