Not entirely sure if it is just me being completely dumb and making a facepalm worthy mistake, but I cannot for the life of me figure out. Is there currently any way you can directly communicate to a MySQL database, or use any of the Oxide.Ext namespace classes? Because on compilation it simply tells me that Oxide namespace doesn't contain a namespace called "Ext". Is it disabled or am I being completely dumb?
Solved MySQL/SQLite problem, no Ext namespace on compilation
Discussion in 'Rust Development' started by Vilsol, Jul 4, 2015.
-
Wulf Community Admin
Without seeing your code, it's hard to tell you exactly where you are going wrong. If you'd like to see some working examples of MySQL/SQLite, I'd recommend searching or seeing each extension's Overview at http://oxidemod.org/extensions/.
-
@Wulf Doesn't matter what code, the compiler just doesn't know that the Oxide.Ext namespace exists.
Code:using Oxide.Ext;namespace Oxide.Plugins { [Info("TestPlugin", "Vilsol", 0.1)] [Description("This is what the plugin does")] public class TestPlugin : RustPlugin { }}
-
Wulf Community Admin
-
Also, your examples are lua and python. -
Wulf Community Admin
-
-
Wulf Community Admin
-
Right, figured it out, if anyone else is having this problem, try this code:
Code:using Oxide.Core; using Oxide.Ext.MySql;namespace Oxide.Plugins { [Info("TestPlugin", "Vilsol", 0.1)] [Description("This is what the plugin does")] public class Arsenal : RustPlugin { private readonly Oxide.Ext.MySql.Libraries.MySql mySQL = Interface.GetMod().GetLibrary<Oxide.Ext.MySql.Libraries.MySql>("MySql"); private Connection connection; void Loaded() { connection = mySQL.OpenDb("host", 3306, "database", "user", "pass");] } }}
-
Wulf Community Admin