attempt to call global 'AccessData' (a nil value)

killmeplease

Mk Z on Steam
Joined
Nov 22, 2007
Messages
2,795
Location
Samara
Why do i get the subject message?

Runtime Error: [string "D:\My Documents\My Games\Sid Meier's Civili..."]:63: attempt to call global 'AccessData' (a nil value)

I am updating my Emigration mod now. There are 2 files: Emigration.lua and ScriptDataManager.lua. AccessData function is declared in ScriptDataManager.lua and is called from Emigration.lua. I'm sure ScriptDataManager.lua is loaded, as I can see it prints "SCRIPT DATA MANAGER LOADED" in the Fire Tuner console, before the error shows up.

What do you think about that?
Thanks
 
Without seeing your .modinfo file and the Emigration.lua file it's hard to say what's wrong, but juding from the fact that ScriptDataManager.lua is printing something it sounds like you've added this file as an InGameAddIn - which won't work.

You need to have Emigration.lua as the InGameAddIn, ScriptDataManager.lua should have "Import into VFS" set to true and Emigration.lua should do a - include("ScriptDataManager.lua")
 
Back
Top Bottom