Skip to content
This repository was archived by the owner on Jul 25, 2021. It is now read-only.
This repository was archived by the owner on Jul 25, 2021. It is now read-only.

Add details and example usages of obj.getVar() etc. #31

@Benjamin-Dobell

Description

@Benjamin-Dobell

A common question on Discord is how to use getVar(), which is a solid indication the documentation isn't sufficient.

We should document how the variables must be global within the object, and that to retrieve variables from the object you must first get a reference to that object with getObjectFromGUID(), then call getVar() on that.

Should probably expand upon:

  • getTable
  • getVar
  • setTable
  • setVar

Also, the docs for getVar should be updated to reflect the fact it does work for tables. Not only does it work just fine for tables, it works for tables containing functions, and userdata etc. You can call functions from other scripts, call functions on the userdata etc. it all works just fine! Instead, getTable really just means copy table! EDIT: See comment below. There are subtle caveats.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions