(12-03-2015, 04:04 PM)Schwertspize Wrote: what happened with your code?
("Plugins loaded!asdfasdrfqwerasdfqwer")
PLMan:CallPlugin(plugin:GetName(),mySpecialFunction)
and I thought you can't Get() the cRoot because only one exists
Not sure what you mean in the first part. The asdfqwe... string is properly logged whenever all plugins load at start or after reload. The second strip of code is 'completely' unrelated.
Second part:
Quote:There is one instance of cPluginManager in Cuberite, to get it, call either cRoot:Get():GetPluginManager() or cPluginManager:Get() function.Right from the API docs.
cPluginManager:Get() gives the error
doallplugins
[00:26:13] Executing console command: "doallplugins"
[00:26:13] LUA: Plugins/HookLoadedTest/main.lua:22: Attempt to call a non-callable object.
[00:26:13] Stack trace:
[00:26:13] [C](-1): cPluginManager
[00:26:13] Plugins/HookLoadedTest/main.lua(22): (no name)
[00:26:13] Stack trace end
[00:26:13] Error in plugin HookLoadedTest calling function <callback>()
cRoot:Get():GetPluginManager():Get() gives the error
doallplugins
[00:27:34] Executing console command: "doallplugins"
[00:27:34] LUA: Plugins/HookLoadedTest/main.lua:22: error in function 'Get'.
argument #1 is 'cPluginManager'; 'cPluginManager' expected.
[00:27:34] Stack trace:
[00:27:34] [C](-1): Get
[00:27:34] Plugins/HookLoadedTest/main.lua(22): (no name)
[00:27:34] Stack trace end
[00:27:34] Error in plugin HookLoadedTest calling function <callback>()
[00:27:34] Unknown command, type 'help' for all commands.
Edit: I JUST SAW THE STATIC THING. Testing to make sure I fixed my idiot move.
Edit2: Nope. . syntax just yelled at me for the rather obvious reason.