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

im doing something wrong and i admit i need some help

12 posts, 440 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

25 days 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
25 days 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
i dont understand why its giving me weapon name errors =/


Defs-Parser: [pcall] error 2 ("[string "gamedata/defs.lua"]:38: [string "gamedata/defs.lua"]:26: error = 2, gamedata/weaponDefs.lua, error = 2, gamedata/weapondefs_post.lua, [string "gamedata/weapondefs_post.lua"]:462: attempt to index field 'name' (a nil value)



[Spoiler]
+0 / -0
23 days ago
even after i fixed the issue comanders fail to spawn they just vanished.. and with no help from other modders im giving up.

im offering a commision to any modder that can help me port my mod from a unit / def tweak into a file mod i have a feeling its easy but im missing something.. if anyone wants the job and can help me port this aswell as help me fix the issue with engineer coms being able to make everything strider hubs can.. pm me

if nobody wants to help then im abandoning modding as its taking too much of my time and im no good at it anyway
+0 / -0
Hm I'd be happy to have a look, but ofc i'm not too intimately familiar.

I should be able to port things into mod, or teach you how to do it sorta.:>

It could be some things where it's looking for a firepoint that doesnt exists. It's easiest to poke me on discord.

It could be also that it is expecting at least something for a wreck or so? idk if its allowed to be a nil value.
+1 / -0
ok thanks! this is great news and really good =)

your hired.. we will need to discuss payment too.. i have work today but ill install discord and send you any information your missing later

if you wanted to get started now here is the working defs tweaks mod

https://zero-k.info/Mods/Detail/49

i think the main issue i managed to fix was porting it required capitalisation changes.. i tried to tidy it up too but i mostly broke it. good luck bro =)

im not sure as the tweak mod i made does have wrecks with nil and does not error.
+0 / -0

22 days ago
mh, well transfering things into a mod should be as "simple" as copying the def changes into the appropriate files

Most things there should probably just work, so I assume the issue would emerge when a scripting change would be needed
+0 / -0
22 days ago
yes.. but whatever the issue is i need some help with that if you can
i sent you a pm with discord request
+0 / -0
22 days ago
file structure:

[Spoiler]

modinfo:

[Spoiler]

UnitDefs_post.lua:

[Spoiler]
+0 / -0


21 days ago
You should really put this in a git repository to make sure people can reproduce your issue.
+4 / -0
thanks for your advice

i will sign up for github

ok i signed up for github ill figure out whats next tomorrow.. been a bussy week for me
+3 / -0