returning an array
#2

Correct me if i'm wrong, but I think this is not possible in pawn. You should try something like this:

pawn Код:
GetRegionName(Float:x,Float:y,result[])
{
new query[128];
    format(query,sizeof(query),"SELECT regionMain,regionSub FROM samp_regions WHERE regionOLX<='%f' AND regionURX>='%f' AND regionURY<='%f' AND regionOLY>='%f' LIMIT 1;",x,x,y,y);
    mysql_query(query, -1, -1, MySQLConnection);
    mysql_store_result(MySQLConnection);
    if(mysql_num_rows(MySQLConnection) > 0)
    {
        mysql_fetch_row(result,"|",MySQLConnection);
    }
    return 1;
}
pawn Код:
new result[35];
    GetRegionName(0,5,result);
Reply


Messages In This Thread
returning an array - by Akmet - 29.12.2010, 12:26
Re: returning an array - by DeathOnaStick - 29.12.2010, 13:10
AW: returning an array - by Akmet - 29.12.2010, 13:53

Forum Jump:


Users browsing this thread: 1 Guest(s)