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

TFS 1.X+ "nil" value while talking to npcs tfs 1.5 - 8.6

Jeyci

Banned User
Joined
May 6, 2023
Messages
289
Solutions
3
Reaction score
36
Hi

When i talk to npc if i say hi / bye or others in conosole i get a "nil" message , how do i remove this? and why is this happening? how to resolve?
thanks
Untitled.png
 
Hi

When i talk to npc if i say hi / bye or others in conosole i get a "nil" message , how do i remove this? and why is this happening? how to resolve?
thanks
View attachment 77179
More then likely it's a print() somewhere in the project that is still there.

If it's happening in all of your npcs, then it's probably in the npc lib files somewhere.

So it's just a matter of searching for it, and removing it.
 
xokas

1690787457350.png

In notepad ++
look for "print(" or pdump or or debugPrint or others
filtre: .lua
in dir npc/lib

surely in

\data\npc\lib\npcsystem\modules.lua
 
yes i did nothing related to it
Lua:
Search "print(" (25 hits in 4 files of 968 searched)
  C:\Users\pasturryx\OneDrive\Documentos\GitHub\pro-ot\data\npc\lib\npc.lua (2 hits)
    Line 112:         print("Warning: Casting value to 32bit to prevent crash\n" .. debug.traceback())
    Line 125:         print("Warning: Casting value to 32bit to prevent crash\n" .. debug.traceback())
  C:\Users\pasturryx\OneDrive\Documentos\GitHub\pro-ot\data\npc\lib\npcsystem\keywordhandler.lua (1 hit)
    Line  70:             print('KeywordNode:addAliasKeyword no previous node found')
  C:\Users\pasturryx\OneDrive\Documentos\GitHub\pro-ot\data\npc\lib\npcsystem\modules.lua (21 hits)
    Line  391:                     print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "Parameter '" .. "keyword_reply" .. n .. "' missing. Skipping...")
    Line  394:                 print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "No keywords found for keyword set #" .. n .. ". Skipping...")
    Line  468:                     print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "Unknown parameter found in travel destination parameter.", temp, destination)
    Line  476:                 print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "Parameter(s) missing for travel destination:", name, x, y, z, cost, premium)
    Line  691:                     print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "Unknown parameter found in buyable items parameter.", temp, item)
    Line  699:                 print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "Item id missing (or invalid) for parameter item:", item)
    Line  703:                         print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "Found duplicated item:", item)
    Line  719:                         print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "SubType missing for parameter item:", item)
    Line  724:                     print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "Parameter(s) missing for item:", itemid, cost)
    Line  729:                         print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "SubType missing for parameter item:", item)
    Line  736:                     print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "Parameter(s) missing for item:", name, itemid, cost)
    Line  766:                     print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "Unknown parameter found in sellable items parameter.", temp, item)
    Line  774:                 print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "Item id missing (or invalid) for parameter item:", item)
    Line  778:                         print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "Found duplicated item:", item)
    Line  791:                     print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "Parameter(s) missing for item:", itemid, cost)
    Line  799:                     print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "Parameter(s) missing for item:", name, itemid, cost)
    Line  831:                     print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "Unknown parameter found in buyable items parameter.", temp, item)
    Line  838:                     print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "SubType missing for parameter item:", item)
    Line  845:                 print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "Parameter(s) missing for item:", name, container, itemid, cost)
    Line  922:                         print("[Warning : " .. Npc():getName() .. "] NpcSystem: Buy price lower than sell price: (" .. shopItem.name .. ")")
    Line 1022:                         print("[Warning : " .. Npc():getName() .. "] NpcSystem: Sell price higher than buy price: (" .. shopItem.name .. ")")
  C:\Users\pasturryx\OneDrive\Documentos\GitHub\pro-ot\data\npc\scripts\Gnomaticus.lua (1 hit)
    Line 18:         print(player:getStorageValue(PlayerStorageKeys.BigfootBurden.QuestLine))

did the same for the whole datapack and nothing that says nil,
Code:
https://paste.bingner.com/paste/c7hoo
 
Last edited:
Edit. Found the problem it was caused by prints in global.lua. why it was displaying nil and not work1, work,2 and so on? don't know, why it's caused while i talk with any npc. don't know either
Lua:
function getBlessingsCost(level)

    if level <= 30 then
    print(work1)
        return 2000
    elseif level >= 120 then
    print(work2)
        return 20000
    else
    print(work3)
        return (level - 20) * 200
    end
end

thread solved
 
Code:
print("work1")
Will print work1
Code:
print(work1)
Will print value of variable work1, which doesn't exist in this case therefore its nil
 
Back
Top