Loading...
  OR  Zero-K Name:    Password:   

im doing something wrong and i admit i need some help

3 posts, 75 views
Post comment
Filter:    Player:  
sort
file structure:

[Spoiler]

modinfo:

[Spoiler]

UnitDefs_post.lua:

[Spoiler]

error:


Defs-Parser: [pcall] error 2 ("[string "gamedata/defs.lua"]:38: [string "gamedata/defs.lua"]:26: error = 2, gamedata/featureDefs.lua, error = 2, gamedata/featuredefs_post.lua, [string "gamedata/featuredefs_post.lua"]:113: attempt to call global 'CopyTable' (a nil value)



i thought it was something to do with me setting
ud.corpse = nil
ud.featureDefs = nil

but commenting it out does nothing =/

if anyone can help me that would be great
+0 / -0

16 hours ago
as someone without actual lua experience, i would look at the file/line

"gamedata/featuredefs_post.lua"]:113: attempt to call global 'CopyTable' (a nil value)

probably some import order issue, looks like CopyTable is not avaliable/initialized
+1 / -0
15 hours ago
im clearly no programmer either but i did try initalizing my own implimentation of CopyTable too and it didnt work =/ i removed it but ill post what i had:


local function CopyTable(orig)
  if type(orig) ~= "table" then return orig end
  local copy = {}
  for k,v in pairs(orig) do
    copy[CopyTable(k)] = CopyTable(v)
  end
  return copy
end



but same error..

somone said i need to include tablefunctions.lua.. so ill try this.

VFS.Include("LuaRules/Utilities/tablefunctions.lua")
+0 / -0