• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

cannot open data/npc/lib/npcsystem/main.lua: No such file or directory

Zazeros

Member
Joined
Feb 13, 2012
Messages
72
Reaction score
17
0.4

Good afternoon everyone,

I'm encountering an issue that's affecting all the NPCs on my server. When I launch the server, the following error message appears for all the NPCs on the map:

data/npc/scripts/genericnpc:1: attempt to index global 'KeywordHandler' (a nil value)
cannot open data/npc/lib/npcsystem/main.lua: No such file or directory

After researching the error, I found a thread with essentially the same problem: Windows - data/npc/lib/npcsystem/main.lua (https://otland.net/threads/data-npc-lib-npcsystem-main-lua.246955/). However, after creating a main.lua file in npc/lib/npcsystem/, the NPCs spawn on the map and deliver their initial greeting or similar message from the XML, but when the message needs to use something from the Lua script in the scripts folder, the NPC stops responding. This issue occurs with all NPCs on the map. I've tried changing the script path in the XML from script="something" to script="data/npc/scripts/something.lua", but I'm still facing issues. Also, after saying 'hi', the NPC doesn't recognize 'bye' or any other keywords from the player. They only seem to speak the greeting message.

I'm looking forward to any help, and thank you very much.
 
You should first attach the code from your "genericnpc". It is trying to use main.lua as KeywordHandler, and that's why it literally says there's no such file or directory. Creating main.lua won't solve anything since it doesn't have the keywordhandlers. So, what we can do?

Let's check the keyworkhandler from any other NPC. It says keywordhandler is = to KeywordHandler:new()

So what the hell is keywordhandler:new()? We go to our data/npc/libs/npc.lua and see which files are included as NPC handlers:
Code:
-- Including the Advanced NPC System
dofile('data/npc/lib/npcsystem/npcsystem.lua')
dofile('data/npc/lib/npcsystem/customModules.lua')

In this case you could load main.lua there. But if there's no code on it, why? haha
So we go to our npcsystem.lua first to see if we can find KeywordHandler:new()

And now, we found that keywordhandler.lua is loaded by npcsystem.lua !!!

So now we had identified where the keywordhandler comes from. We go ahead for keywordhandler.lua at line 95 orts2/data/npc/lib/npcsystem/keywordhandler.lua at main · EPuncker/orts2 (https://github.com/EPuncker/orts2/blob/main/data/npc/lib/npcsystem/keywordhandler.lua#L95)

And what is there? Omg our keywordhandler function.
Lua:
function KeywordHandler:new()
        local obj = {}
        obj.root = KeywordNode:new(nil, nil, nil)
        obj.lastNode = {}
        setmetatable(obj, self)
        self.__index = self
        return obj
    end

So here's my advice! Any time you do a modification to your datapack think on the login behind it. Everything is connected and it there for a reason. And a last one, stop using TFS 0.4. Have fun! Regards :)
 
Hey @ralke, thank you for answering.

My data/npc/lib/npc.lua was very different from what you use as an example. Actually, all my lib folder is different from that one, and didn't have any "dofile" in it. I tried to replace with what you sued and got this error:
[18:18:00] [Error - NpcScript Interface]
[18:18:00] data/npc/scripts/druid task 2.lua:eek:nCreatureAppear
[18:18:00] Description:
[18:18:00] data/npc/lib/npcsystem/npchandler.lua:373: attempt to index local 'creature' (a number value)
[18:18:00] stack traceback:
[18:18:00] data/npc/lib/npcsystem/npchandler.lua:373: in function 'onCreatureAppear'
[18:18:00] data/npc/scripts/druid task 2.lua:15: in function <data/npc/scripts/druid task 2.lua:15>

[18:18:00] [Error - NpcScript Interface]
[18:18:00] data/npc/scripts/druid first task.lua:eek:nCreatureAppear
[18:18:00] Description:
[18:18:00] data/npc/lib/npcsystem/npchandler.lua:373: attempt to index local 'creature' (a number value)
[18:18:00] stack traceback:
[18:18:00] data/npc/lib/npcsystem/npchandler.lua:373: in function 'onCreatureAppear'
[18:18:00] data/npc/scripts/druid first task.lua:5: in function <data/npc/scripts/druid first task.lua:5>

[18:18:03] [Error - NpcScript Interface]
[18:18:03] data/npc/scripts/druid first task.lua:eek:nCreatureSay
[18:18:03] Description:
[18:18:03] data/npc/lib/npcsystem/npchandler.lua:417: attempt to index local 'creature' (a number value)
[18:18:03] stack traceback:
[18:18:03] data/npc/lib/npcsystem/npchandler.lua:417: in function 'onCreatureSay'
[18:18:03] data/npc/scripts/druid first task.lua:7: in function <data/npc/scripts/druid first task.lua:7>

I am using this one: 3777/data/npc/lib at main · Fir3element/3777 (https://github.com/Fir3element/3777/tree/main/data/npc/lib).

I don't know if you meant for me to do this and replace my scripts, but because I actually didn't understand your answer very well, sorry.
And a last one, stop using TFS 0.4.
Hahaha

It's because I think it's easier to configure, because that's how I learned, and I only do it as a hobby and for some friends to play, so it doesn't make much sense for me to switch to 1.x
 
Hey @ralke, thank you for answering.

My data/npc/lib/npc.lua was very different from what you use as an example. Actually, all my lib folder is different from that one, and didn't have any "dofile" in it. I tried to replace with what you sued and got this error:


I am using this one: 3777/data/npc/lib at main · Fir3element/3777 (https://github.com/Fir3element/3777/tree/main/data/npc/lib).

I don't know if you meant for me to do this and replace my scripts, but because I actually didn't understand your answer very well, sorry.

Hahaha

It's because I think it's easier to configure, because that's how I learned, and I only do it as a hobby and for some friends to play, so it doesn't make much sense for me to switch to 1.x
It's the same thing, but using older functions.
Go to main.lua and search for
Lua:
dofile(getDataDir() .. 'npc/lib/npcsystem/keywordhandler.lua')
And the error says that is attempting to index a variable called KeywordHandler, that is here delcared as nil

So the question is, how is the druid task.lua script trying to trigger the KeywordHandler. If we search for "bye" on npchandler.lua we encounter that is equal to FOCUS_FAREWELLWORDS. We see that FOCUS_FAREWELLWORDS are used in this function of modules.lua.

Lua:
for i, word in pairs(FOCUS_FAREWELLWORDS) do
            local obj = {}
            table.insert(obj, word)
            obj.callback = FOCUS_FAREWELLWORDS.callback or FocusModule.messageMatcher
            handler.keywordHandler:addKeyword(obj, FocusModule.onFarewell, {module = self})
        end

So probably, your keywordandler is nil because of the following reason. We have a local variable called local obj = {} that is supposed to be used to hold our keywordhandler value right? That is "bye". So we have a table.insert with obj (our local variable that holds information), and word. If we search for word, it represents the value of each element in the table (in this case FOCUS_FAREWELLWORDS).

So after all this explaination here goes the simple answer. Your druid first task.lua is not getting the "bye" words from anywhere. So you NPC should be missing a function in charge of ending the dialog. Check other NPCs from that Fir3lement repository and compare to yours to see if you're mising a keyword module


Also I need you to attach here that druid first task.lua otherwise I won't be able to know where the error is. But with all this explaination i'm sure you will be able to fix it. Regards!
 
Last edited:
@ralke
Sorry for my ignorance, but I'm really trying to understand what is happening.
I have my own NPC, a random one (since all of them are having issues) and it only responds to the 'message_greet'. It doesn’t reply to 'bye' or any other phrase.
However, if I add a phrase to 'message_walkaway', it speaks that phrase when walking away. I tried using an NPC from Fir3element, Aldo, on my server, but no success either. He just stares at me when I say 'boots' or 'soft'. Testing with others seems to yield the same issue.

Here is the Lua and XML script of my NPC, for you to have an example:

Lua:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Myller Leafwalker" script="data/npc/scripts/druid first task.lua" walkinterval="5000" floorchange="0">
    <health now="100" max="100"/>
    <look type="148" body="113" feet="123" head="0"  legs="124"  addons="0" />
    <parameters>
        <parameter key="message_greet" value="Greetings. You are in the Verdant Sanctuary Enclave, and we are pleased to have you here with us. If you have any questions about the druid vocation, please feel free to ask me. However, if you are looking for work, you can always {help}." />
                <parameter key="module_keywords" value="1" />
        <parameter key="keywords" value="druid" />
        <parameter key="keyword_reply1" value="We are a peaceful people who use the magic of nature to defend ourselves, using elements of ice and earth. We also have plenty of healing spells, both for us and our allies. We are certainly very important in any group." />           
        </parameters>
</npc>

Lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end



function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local markTable1 = {

    {markPos = {x = 1112, y = 1009, z = 8}, markType = MAPMARK_SWORD, markDescription = ""}
}
local markTable2 = {

    {markPos = {x = 870, y = 1059, z = 7}, markType = MAPMARK_SKULL, markDescription = ""}
}

local func_addMark = doPlayerAddMapMark
    if(not func_addMark) then
      func_addMark = doAddMapMark
    end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if(msgcontains(msg, 'help')) then
selfSay("It's really good to hear that. Are you prepared?", cid)
end
    if(msgcontains(msg, 'yes')) then
        if(getPlayerStorageValue(cid,22542) == -1) then
        for mark, x in pairs(markTable1) do
            func_addMark(cid, x.markPos, x.markType, x.markDescription ~= nil and x.markDescription or "")
        end
           setPlayerStorageValue(cid,22542,2)
          
            selfSay("", cid)
            addEvent(function()
                if isCreature(cid) then
                selfSay("", cid)
                end
             end, 3500)
            talkState[talkUser] = 0
            
elseif(getPlayerStorageValue(cid,22542) == 2) then
selfSay('', cid)
            talkState[talkUser] = 1   
elseif(getPlayerStorageValue(cid,22542) == 3) then
selfSay('', cid)
            talkState[talkUser] = 1   
            
            
            
elseif (getPlayerStorageValue(cid,22542) == 4) then
            for mark, x in pairs(markTable2) do
            func_addMark(cid, x.markPos, x.markType, x.markDescription ~= nil and x.markDescription or "")
        end
           setPlayerStorageValue(cid,22542,6)
                selfSay('', cid)
                talkState[talkUser] = 1
elseif(getPlayerStorageValue(cid,22542) == 5) then
selfSay('', cid)
talkState[talkUser] = 1   
elseif(getPlayerStorageValue(cid,22542) == 6) then
selfSay('', cid)
talkState[talkUser] = 1   
            -------------------------------
elseif (getPlayerStorageValue(cid,22542) == 7) then
            talkState[talkUser] = 1   
         for mark, x in pairs(markTable3) do
            func_addMark(cid, x.markPos, x.markType, x.markDescription ~= nil and x.markDescription or "")
        end
           setPlayerStorageValue(cid,22542,8)
            if(getPlayerSex(cid) == 1) then
                selfSay('', cid)
                else
                selfSay('', cid)
                end
                talkState[talkUser] = 1
elseif(getPlayerStorageValue(cid,22542) == 8) then
selfSay('', cid)
            talkState[talkUser] = 1   
            -------------------------------
elseif (getPlayerStorageValue(cid,22542) == 14) then
            talkState[talkUser] = 1   
         for mark, x in pairs(markTable4) do
            func_addMark(cid, x.markPos, x.markType, x.markDescription ~= nil and x.markDescription or "")
        end
           setPlayerStorageValue(cid,22542,15)
                selfSay('', cid)
                talkState[talkUser] = 1
elseif(getPlayerStorageValue(cid,22542) == 15) then
selfSay('', cid)
            talkState[talkUser] = 1   
                
                
elseif (getPlayerStorageValue(cid,22542) == 21) then
            talkState[talkUser] = 1   
         for mark, x in pairs(markTable3) do
            func_addMark(cid, x.markPos, x.markType, x.markDescription ~= nil and x.markDescription or "")
        end
           setPlayerStorageValue(cid,22542,22)
            if(getPlayerSex(cid) == 1) then
                selfSay('', cid)
                else
                selfSay('', cid)
                end
                talkState[talkUser] = 1
elseif(getPlayerStorageValue(cid,22542) == 22) then
selfSay('', cid)
            talkState[talkUser] = 1   
                
                
                
        end
        ---------------------------------------
        elseif(msgcontains(msg, '') and talkState[talkUser] == 1) then
        if getPlayerStorageValue(cid,22542) == 3 then
        if isFeral(cid) then
            setPlayerStorageValue(cid,22542,4)
            doPlayerAddItem(cid,2152,5)
            doPlayerAddItem(cid,2482,1)
            local pos = getPlayerPosition(cid)
            doSendAnimatedText(pos, 5000, TEXTCOLOR_WHITE)
            doPlayerAddExp(cid, 5000)
            selfSay("", cid)
            talkState[talkUser] = 0
        elseif isDruid(cid) then
            setPlayerStorageValue(cid,22542,4)
            doPlayerAddItem(cid,2152,5)
            doPlayerAddItem(cid,2182,1)
            doPlayerAddItem(cid,8820,1)
            local pos = getPlayerPosition(cid)
            doSendAnimatedText(pos, 5000, TEXTCOLOR_WHITE)
            doPlayerAddExp(cid, 5000)
            selfSay("", cid)
            talkState[talkUser] = 0
            end
            
        else
            selfSay("", cid)
        end
        ---------------------------------------
        elseif(msgcontains(msg, '') and talkState[talkUser] == 1) then
        if getPlayerStorageValue(cid,22542) == 6 then
            local pos = getPlayerPosition(cid)
            doPlayerAddItem(cid, 2148, 55)
            doPlayerAddItem(cid, 2649, 1)
            doSendAnimatedText(pos, 550, TEXTCOLOR_WHITE)
            setPlayerStorageValue(cid,22542,7)
            doPlayerAddExp(cid, 550)
            selfSay('', cid)
            talkState[talkUser] = 0
        else
            selfSay('', cid)
        end
        ---------------------------------------
        
        ------------------------------------------
        
    end
    
    
end   

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())


I really appreciate your time.
 
@ralke
Sorry for my ignorance, but I'm really trying to understand what is happening.
I have my own NPC, a random one (since all of them are having issues) and it only responds to the 'message_greet'. It doesn’t reply to 'bye' or any other phrase.
However, if I add a phrase to 'message_walkaway', it speaks that phrase when walking away. I tried using an NPC from Fir3element, Aldo, on my server, but no success either. He just stares at me when I say 'boots' or 'soft'. Testing with others seems to yield the same issue.

Here is the Lua and XML script of my NPC, for you to have an example:

Lua:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Myller Leafwalker" script="data/npc/scripts/druid first task.lua" walkinterval="5000" floorchange="0">
    <health now="100" max="100"/>
    <look type="148" body="113" feet="123" head="0"  legs="124"  addons="0" />
    <parameters>
        <parameter key="message_greet" value="Greetings. You are in the Verdant Sanctuary Enclave, and we are pleased to have you here with us. If you have any questions about the druid vocation, please feel free to ask me. However, if you are looking for work, you can always {help}." />
                <parameter key="module_keywords" value="1" />
        <parameter key="keywords" value="druid" />
        <parameter key="keyword_reply1" value="We are a peaceful people who use the magic of nature to defend ourselves, using elements of ice and earth. We also have plenty of healing spells, both for us and our allies. We are certainly very important in any group." />         
        </parameters>
</npc>

Lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end



function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local markTable1 = {

    {markPos = {x = 1112, y = 1009, z = 8}, markType = MAPMARK_SWORD, markDescription = ""}
}
local markTable2 = {

    {markPos = {x = 870, y = 1059, z = 7}, markType = MAPMARK_SKULL, markDescription = ""}
}

local func_addMark = doPlayerAddMapMark
    if(not func_addMark) then
      func_addMark = doAddMapMark
    end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if(msgcontains(msg, 'help')) then
selfSay("It's really good to hear that. Are you prepared?", cid)
end
    if(msgcontains(msg, 'yes')) then
        if(getPlayerStorageValue(cid,22542) == -1) then
        for mark, x in pairs(markTable1) do
            func_addMark(cid, x.markPos, x.markType, x.markDescription ~= nil and x.markDescription or "")
        end
           setPlayerStorageValue(cid,22542,2)
        
            selfSay("", cid)
            addEvent(function()
                if isCreature(cid) then
                selfSay("", cid)
                end
             end, 3500)
            talkState[talkUser] = 0
          
elseif(getPlayerStorageValue(cid,22542) == 2) then
selfSay('', cid)
            talkState[talkUser] = 1 
elseif(getPlayerStorageValue(cid,22542) == 3) then
selfSay('', cid)
            talkState[talkUser] = 1 
          
          
          
elseif (getPlayerStorageValue(cid,22542) == 4) then
            for mark, x in pairs(markTable2) do
            func_addMark(cid, x.markPos, x.markType, x.markDescription ~= nil and x.markDescription or "")
        end
           setPlayerStorageValue(cid,22542,6)
                selfSay('', cid)
                talkState[talkUser] = 1
elseif(getPlayerStorageValue(cid,22542) == 5) then
selfSay('', cid)
talkState[talkUser] = 1 
elseif(getPlayerStorageValue(cid,22542) == 6) then
selfSay('', cid)
talkState[talkUser] = 1 
            -------------------------------
elseif (getPlayerStorageValue(cid,22542) == 7) then
            talkState[talkUser] = 1 
         for mark, x in pairs(markTable3) do
            func_addMark(cid, x.markPos, x.markType, x.markDescription ~= nil and x.markDescription or "")
        end
           setPlayerStorageValue(cid,22542,8)
            if(getPlayerSex(cid) == 1) then
                selfSay('', cid)
                else
                selfSay('', cid)
                end
                talkState[talkUser] = 1
elseif(getPlayerStorageValue(cid,22542) == 8) then
selfSay('', cid)
            talkState[talkUser] = 1 
            -------------------------------
elseif (getPlayerStorageValue(cid,22542) == 14) then
            talkState[talkUser] = 1 
         for mark, x in pairs(markTable4) do
            func_addMark(cid, x.markPos, x.markType, x.markDescription ~= nil and x.markDescription or "")
        end
           setPlayerStorageValue(cid,22542,15)
                selfSay('', cid)
                talkState[talkUser] = 1
elseif(getPlayerStorageValue(cid,22542) == 15) then
selfSay('', cid)
            talkState[talkUser] = 1 
              
              
elseif (getPlayerStorageValue(cid,22542) == 21) then
            talkState[talkUser] = 1 
         for mark, x in pairs(markTable3) do
            func_addMark(cid, x.markPos, x.markType, x.markDescription ~= nil and x.markDescription or "")
        end
           setPlayerStorageValue(cid,22542,22)
            if(getPlayerSex(cid) == 1) then
                selfSay('', cid)
                else
                selfSay('', cid)
                end
                talkState[talkUser] = 1
elseif(getPlayerStorageValue(cid,22542) == 22) then
selfSay('', cid)
            talkState[talkUser] = 1 
              
              
              
        end
        ---------------------------------------
        elseif(msgcontains(msg, '') and talkState[talkUser] == 1) then
        if getPlayerStorageValue(cid,22542) == 3 then
        if isFeral(cid) then
            setPlayerStorageValue(cid,22542,4)
            doPlayerAddItem(cid,2152,5)
            doPlayerAddItem(cid,2482,1)
            local pos = getPlayerPosition(cid)
            doSendAnimatedText(pos, 5000, TEXTCOLOR_WHITE)
            doPlayerAddExp(cid, 5000)
            selfSay("", cid)
            talkState[talkUser] = 0
        elseif isDruid(cid) then
            setPlayerStorageValue(cid,22542,4)
            doPlayerAddItem(cid,2152,5)
            doPlayerAddItem(cid,2182,1)
            doPlayerAddItem(cid,8820,1)
            local pos = getPlayerPosition(cid)
            doSendAnimatedText(pos, 5000, TEXTCOLOR_WHITE)
            doPlayerAddExp(cid, 5000)
            selfSay("", cid)
            talkState[talkUser] = 0
            end
          
        else
            selfSay("", cid)
        end
        ---------------------------------------
        elseif(msgcontains(msg, '') and talkState[talkUser] == 1) then
        if getPlayerStorageValue(cid,22542) == 6 then
            local pos = getPlayerPosition(cid)
            doPlayerAddItem(cid, 2148, 55)
            doPlayerAddItem(cid, 2649, 1)
            doSendAnimatedText(pos, 550, TEXTCOLOR_WHITE)
            setPlayerStorageValue(cid,22542,7)
            doPlayerAddExp(cid, 550)
            selfSay('', cid)
            talkState[talkUser] = 0
        else
            selfSay('', cid)
        end
        ---------------------------------------
      
        ------------------------------------------
      
    end
  
  
end 

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())


I really appreciate your time.
Ok try:

1) This at the NPC .xml
<parameter key="message_farewell" value="Good bye."/>
2) You can also try this on .lua
Lua:
FOCUS_FAREWELLSWORDS = {'bye', 'farewell', 'see ya'}
self.npcHandler = handler
    for i, word in pairs(FOCUS_FAREWELLSWORDS) do
       local obj = {}
       table.insert(obj, word)
       obj.callback = FOCUS_FAREWELLSWORDS.callback or FocusModule.messageMatcher
       handler.keywordHandler:addKeyword(obj, FocusModule.onFarewell, {module = self})
     end

Or maybe try this solution
See if you have self:say(msg, cid) instead of selfSay(msg, cid) inside your npchandler.lua

If any of those solutions don't work reply and we will try something else
Regards!
 
@ralke
I tried all of this but to no avail. The problem is not that the npc is not saying bye, but that nothing is working, except the message_greet in the xml.
The LUA file and other messages within the XML are not getting any, and no errors in the console.
 
Well if nothing works the issue here is that you don't have any module working.
Taking this reply
Zazeros said:
My data/npc/lib/npc.lua was very different from what you use as an example. Actually, all my lib folder is different from that one, and didn't have any "dofile" in it. I tried to replace with what you sued and got this error:
Is the proof of it. I won't tell you to attach your modules here since they're large files. I suggest to back-up and then replace all the content from npc/lib folder for this one:
If that still doesn't work we going to have to take a look on those modules. Tell me how it goes ;)
Regards
 
@ralke
Yeah, I already did that. However having the same problem.
Still want to see the modules.lua? It's the same as this one tho 3777/data/npc/lib/npcsystem/modules.lua at main · Fir3element/3777 (https://github.com/Fir3element/3777/blob/main/data/npc/lib/npcsystem/modules.lua)
Hmm let's resume. We have an error where a script is attempting to find a KeywordHandler.
attempt to index global 'KeywordHandler' (a nil value)
And we recently have the fact that none of the modules of the npc is loading.
Zazeros said:
The problem is not that the npc is not saying bye, but that nothing is working, except the message_greet in the xml
But now I see that the modules.lua is exactly the same than the 3777 one.
And we also know that FOCUS_GREETWORDS works.

So let's think, FOCUS_GREETWORDS works so the module is iniciated, this means 3777/data/npc/lib/npcsystem/modules.lua at main · Fir3element/3777 (https://github.com/Fir3element/3777/blob/main/data/npc/lib/npcsystem/modules.lua#L201)
That modules.lua is working right?

So what about the rest. If main.lua is the file that loads the other modules
Lua:
-- Loads the underlying classes of the npcsystem.
    dofile(getDataDir() .. 'npc/lib/npcsystem/keywordhandler.lua')
    dofile(getDataDir() .. 'npc/lib/npcsystem/queue.lua')
    dofile(getDataDir() .. 'npc/lib/npcsystem/npchandler.lua')
    dofile(getDataDir() .. 'npc/lib/npcsystem/modules.lua')

Which file is in charge of loading main.lua? Or that's definitely loaded by sources?. I think the best thing we can do is to check this via discord. Otherwise I can't guess what can be wrong, but I can surely say that your modules are not loading correctly for some reason.

This wouldn't be happening if you guys use a distribution from this year and not some random distribution from 10 years ago (0.4), but anyways, here we are 🤷‍♂️. Add me at discord, felipe23.

Regards!
 
Back
Top Bottom