• 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 attempt to call global getDataDir()

Bergvall

cultera.net owner
Joined
Jun 8, 2008
Messages
99
Reaction score
2
Is there any easy way to fix this? I've moved my OTHire NPC-pack to TFS 1.5 downgrade by nekiro. I've tried different libs, nothing seems to work.



NPCerror.png
 
Solution
I guess that is an old function from 0.X, since everything I could found about that functions is this thread of lua functions:

Try to merge this datapack as reference, it has correct NPCs

Anyways I suggest to post the script of at least one of thoose NPCs to see where is getDataDir called and have a better clue of what's wrong
Regards!
Post automatically merged:

Edit. Just figured out what happened, I saw this post

And checked that getDataDir() was a function to load certain modules. I think this function was completely removed, so if u have any line that...
I guess that is an old function from 0.X, since everything I could found about that functions is this thread of lua functions:

Try to merge this datapack as reference, it has correct NPCs

Anyways I suggest to post the script of at least one of thoose NPCs to see where is getDataDir called and have a better clue of what's wrong
Regards!
Post automatically merged:

Edit. Just figured out what happened, I saw this post

And checked that getDataDir() was a function to load certain modules. I think this function was completely removed, so if u have any line that calls getDataDir() on your npc/lib, just replace, for example:

Lua:
dofile(getDataDir() .. 'npc/lib/npcsystem/customModules.lua')

For this
Lua:
dofile('data/npc/lib/npcsystem/customModules.lua')

And that will work. Regards!
 
Last edited:
Solution
Back
Top