Jump to content
Keuvyn T.

About Hook Function

Recommended Posts

Good night guys from PKO DEV,:ok:

 

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

 

Share this post


Link to post
Share on other sites
1 hour ago, Keuvyn T. said:

Good night guys from PKO DEV,:ok:

 

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


logo-big.png   logo.png

                                   Sunny Go! Online                                                                    pko.host                                                 

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...