Modding Help Can't use Widget functions

Discussion in 'Starbound Modding' started by cat2002, Feb 16, 2017.

  1. cat2002

    cat2002 Big Damn Hero

    I can't use any widget functions, I get this error when I try.
    attempt to index a nil value (global 'widget')
  2. EmissaryOfInfinity

    EmissaryOfInfinity Aquatic Astronaut

    Without context, no one can help you. What kind of mod are you trying to make, what does your code look like?
    Personally, I don't know much aboug widget functions yet, but they may be similar to player functions in that they can only be called by certain types of scripts. So a tech mod, for example, would be unable to call any player functions, while a ScriptPane would be able. So it may just be that whatever you're doing doesn't have access.
    Also keep in mind, the current HUD widgets are hard-coded, as far as I understand it. While you can change the visual credentials of the widgets, you can't change their function, or add new ones. Hopefully this isn't true, though, as I would love to be able to add a proper tech screen for my own mod at some point.
  3. cat2002

    cat2002 Big Damn Hero

    I'm modifying the sign shop gui, I've added a widget and made it run a function in the lua file but the widget functions don't work at all.

Share This Page