warning 209: returning values
#1

Hey guys, I've ran through a small problem. Since it's been a long time I scripted - I'm not able to solve this simple shit easily. I've made a function to fetch a value from a database (MySQL).

pawn Код:
function FetchBankAccountByName(name[24])
{
    mysql_format(MySQL, gQuery, 256, "SELECT * FROM `"Banks_Table"` WHERE `Holder` = '%e'", name);
    mysql_tquery(MySQL, gQuery, "Safe_FetchBankAccountByName", "i");
}

function Safe_FetchBankAccountByName(Balance)
{
    new rows, fields;
    cache_get_data(rows, fields);
    if(rows)
    {
        Balance = cache_get_field_content_int(0, "Balance", MySQL);
    }
    return Balance;
}
and this is where I'm using it:
pawn Код:
if(!IsPlayerConnected(GetPlayerID(Bank_Transfer_To[playerid])))
    mysql_format(MySQL, str, sizeof str, "UPDATE `"Banks_Table"` SET `Balance` = '%i' WHERE `Holder` = '%e'", FetchBankAccountByName(Bank_Transfer_To[playerid]) + value, Bank_Transfer_To[playerid]);
    mysql_tquery(MySQL, str, "", "");
}
Help me finish this piece of code, guys.

Thanks!
Reply


Messages In This Thread
warning 209: returning values - by biker122 - 14.04.2016, 13:37
Re: warning 209: returning values - by Konstantinos - 14.04.2016, 13:48
Re: warning 209: returning values - by biker122 - 14.04.2016, 13:53
Re: warning 209: returning values - by Konstantinos - 14.04.2016, 14:00
Re: warning 209: returning values - by biker122 - 14.04.2016, 14:18
Re: warning 209: returning values - by Konstantinos - 14.04.2016, 14:25
Re: warning 209: returning values - by biker122 - 14.04.2016, 14:33
Re: warning 209: returning values - by Konstantinos - 14.04.2016, 14:40
Re: warning 209: returning values - by biker122 - 14.04.2016, 15:35

Forum Jump:


Users browsing this thread: 1 Guest(s)