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:
(I'm using the 1.0 nightly.. )