View Single Post
  #3  
Unread 05-12-2012, 01:56 PM
K1R4D3L K1R4D3L is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Feb 2012
Posts: 34
It apparently depends on how you get your plugin object which way you get the version out.

Code:
for _, plugin in ipairs(Turbine.PluginManager.GetAvailablePlugins()) do
	if (plugin.Name == "KillTracker") then
		Turbine.Shell.WriteLine(""..plugin.Version);
		--Turbine.Shell.WriteLine(""..plugin:GetVersion()); --fails
	end
end
--Turbine.Shell.WriteLine(""..Plugins["KillTracker"].Version); --fails
Turbine.Shell.WriteLine(""..Plugins["KillTracker"]:GetVersion());
Either way though, the working command returns the old version until you either exit the game and re-open, or, you're right, run "/plugins refresh" or hit the refresh button in the plugins manager (I'd never used these for anything).

I'm still concerned that users aren't going to refresh and are just going to load the new version, causing problems. If there wasn't a data corruption risk, it wouldn't matter so much, but as much as I don't like it, I think I'm going to have to hard-code the version in the code and maintain it.
Reply With Quote