10-23-2013, 12:59 AM
Yeah that's not gonna work 
You will have to make those Object functions global so other plugins can access them.
Use some kind of key to identify the Objects, this could be the player name and pass that key to the functions. You will need to keep track of the Objects in your plugin yourself.
I suppose you would like to call LoadPasswords() from another plugin? And then the other plugin will receive this Object containing functions.
To still have the same functionality without passing tables around you need to restructure some things.

You will have to make those Object functions global so other plugins can access them.
Use some kind of key to identify the Objects, this could be the player name and pass that key to the functions. You will need to keep track of the Objects in your plugin yourself.
I suppose you would like to call LoadPasswords() from another plugin? And then the other plugin will receive this Object containing functions.
To still have the same functionality without passing tables around you need to restructure some things.
local AllLoadedStuff = {} function LoadPasswords(path) -- ... do stuff -- Create a unique key AllLoadedStuff[Key] = WhateverYouLoaded return Key end -- Former Object:GetPassFromPlayer function GetPassFromPlayer(Key, PlayerName) local Object = AllLoadedStuff[Key]; -- Still use Object functions return Object:GetPassFromPlayer(PlayerName) -- Or copy everything in here if Table[PlayerName] ~= nil then return true, Table[PlayerName] end return false endNot sure if it's clear what I mean?
