Using PluginVars()

BECOME PART OF THE COMMUNITY - Sign up here
  • How are PluginVars() used?

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

    Code
    local v = PluginVars()
    SetVar(v, "BestBeer", "Guinness")
    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
    PluginVars("Beer", "Guinness")
    local x = PluginVars("Beer")
    Echo(x.name) -- Beer :/

    Just wondering how/if it can be used.

    Thanks!

    Edited once, last by hoss: Fixed Lost "L" (April 30, 2020 at 5:39 PM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!