Ok, so I am trying to send a result handle from another plugin to another by a native.
Base:
Code:
// MySQL Query ( Use hrp_select for selecting data from MySQL )
public h_query( query[], Result:result)
{
param_convert( 1 );
param_convert( 2 );
result = dbi_query( g_db, query )
new ret;
if( result == RESULT_FAILED ) ret = -1;
if( result == RESULT_NONE )ret = 0;
if( result == RESULT_OK) ret = 1;
return ret;
}
Include file:
Code:
native hrp_query( query[], Result:result )
Plugin using the native:
Code:
format( g_query, 255, "SELECT wallet, bank FROM accounts WHERE steamid='%s'", authid );
if( hrp_query( g_query, g_result) == 1 )
{
g_wallet[id] = dbi_result( g_result, "wallet" );
g_bank[id] = dbi_result( g_result, "bank" );
dbi_free_result( g_result );
return PLUGIN_CONTINUE
}
I haven't got it to work.
So, is it possible to pass Result handles or not? If it is, what have I done wrong?
Thanks, for your time.
__________________