Modding Help Help Understanding Json

Discussion in 'Starbound Modding' started by Ecafymtoohs, Dec 11, 2018.

Tags:
  1. Ecafymtoohs

    Ecafymtoohs Big Damn Hero

    I'm trying to get my weapon ability's lua file to print the current data that corresponds to the blade of a sword. The sword's activeitem is the root in this case, but I can't seem to get the path to get the data.

    I'm trying to get the information displayed into the log like this:
    sb.logInfo("Root: " .. root.itemConfig(activeItem.animationParts.blade))

    However, it stops the broadsword from being able to update it's state and gives this error:
    [21:59:03.637] [Error] Exception while calling script uninit: (LuaException) Error code 2, [string "/items/active/weapons/melee/abilities/multi/s..."]:42: attempt to index a nil value (field 'animationParts')

    Does anyone know how to correctly lay out Json paths so that the lua can read it?
    I've looked online already, but everything I've tried has simply not worked, either giving the same or a similar error.

    Any information or help is appreciated.

    Many thanks,
    Ecaf'mtoohs
     

Share This Page