returning an array
#3

kk thank you
it runs now

but i include the split function directly into the stock

GetRegionName(Float,Float:y,dest[][])
{
new query[256],result[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);
split(result, dest, '|');
}
return 1;
}

USAGE:
new array[2][32];
GetRegionName(x,y,array);
array[0]: regionMain
array[1]: regionSub
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: 5 Guest(s)