• 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!

Lua Keyword Errors

Mudrock

Member
Joined
Jan 25, 2017
Messages
102
Reaction score
19
Location
Minas Gerais - Brazil
The error appeared after I migrated my server from tfs to otx to get better support! Because matt is always updating his repository.

Some of npcs work normally but others gave some function errors! I believe that these functions have been replaced by others.
Here's the pastebin from my console:
Http://pastebin.com/raw/DM3u5x9g

Good also follows the pastebin of my keywords file:
Http://pastebin.com/raw/6nmCCtnR

I'm sorry if I was misinterpreted somewhere in the topic or even rude! I'm not good at English and my broker does not cooperate.
 
Solution
under the function called FocusModule:init:
Lua:
    function FocusModule:addGreetMessage(message)
       if not self.greetWords then
           self.greetWords = {}
       end


       if type(message) == 'string' then
           table.insert(self.greetWords, message)
       else
           for i = 1, #message do
               table.insert(self.greetWords, message[i])
           end
       end
   end
attempt to call method 'addGreetMessage' (a nil value)

it means addGreetMessage is not a method that exists in OTX for KeywordHandler (a method is another word for a function that belongs to an object)
try looking for the function in your old tfs files and putting it in your OTX files
 
attempt to call method 'addGreetMessage' (a nil value)

it means addGreetMessage is not a method that exists in OTX for KeywordHandler (a method is another word for a function that belongs to an object)
try looking for the function in your old tfs files and putting it in your OTX files

I need help! Here are how two libs I use!
The former first and last the current! Help me man
Old: http://pastebin.com/raw/7uFfn8Ht
Current: http://pastebin.com/raw/URV57MnW
 
under the function called FocusModule:init:
Lua:
    function FocusModule:addGreetMessage(message)
       if not self.greetWords then
           self.greetWords = {}
       end


       if type(message) == 'string' then
           table.insert(self.greetWords, message)
       else
           for i = 1, #message do
               table.insert(self.greetWords, message[i])
           end
       end
   end
 
Solution
under the function called FocusModule:init:
Lua:
    function FocusModule:addGreetMessage(message)
       if not self.greetWords then
           self.greetWords = {}
       end


       if type(message) == 'string' then
           table.insert(self.greetWords, message)
       else
           for i = 1, #message do
               table.insert(self.greetWords, message[i])
           end
       end
   end

It worked perfectly and based on this script get solved the other similar problems! I'm still experiencing problems with some NPCs but nothing that I can not solve ....
Thank you very much @Xeraphus
 
Back
Top