Wiebelt Posted June 6, 2009 Share Posted June 6, 2009 Hi, Im making a resource that connects to a MySQL database and basically wraps all of the functions of MTA MySQL and does some stuff for you. Also there will be only one MySQL connection. I have a problem though. When i call a exported function it returns the data it returns as a string type instead of the original userdata type. Is it possible to get it as the right type, is this a bug ? I'll show some code. From the db resource: -- get mysql_socket function get_socket () outputChatBox(type(mysql_socket)) return mysql_socket end From a different resource: function typeTest (thePlayer) outputChatBox(type(exports.db:get_socket())) end addCommandHandler("tt", typeTest) The result: userdata string (I'm using the 1.0 nightly.. ) Link to comment
50p Posted June 6, 2009 Share Posted June 6, 2009 It must be bug because code looks fine. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now