Using PluginVars()

  • How are PluginVars() used?


    At first I thought it might have been used like GlobalVars or LocalVars but doesn't work.


    Code
    1. local v = PluginVars()
    2. SetVar(v, "BestBeer", "Guinness")
    3. local x = GetVar(v, "BestBeer") -- Err: GetVar wrong Parameter #1


    Then I realized that PluginVars() is of type Plugin Preferences and not Variables like the others and its name is set to the name of the Plugin, So I'm guessing its a reference to the Plugin Object itself?


    I tried messing around with it for a bit but not kind of nowhere.


    Code
    1. PluginVars("Beer", "Guinness")
    2. local x = PluginVars("Beer")
    3. Echo(x.name) -- Beer :/


    Just wondering how/if it can be used.


    Thanks!