15.12.2013, 14:10
(
Последний раз редактировалось HellYeah; 15.12.2013 в 15:35.
)
PHP код:
stock getFreeFraktAutoDBid()
{
new pAuto,maxautos,data[256],query[256];
format(query,sizeof(query),"SELECT id FROM FraktionsCars ORDER by id DESC");
mysql_function_query(dbhandle,query,false,"","");
mysql_store_result();
if(mysql_num_rows()>0)
{
data = cache_get_field_content_int(0,"id",dbhandle);
//mysql_fetch_field("id",data);
maxautos=strval(data);
}
mysql_free_result();
for(new i=1; i<=maxautos+1; i++)
{
format(query,sizeof(query),"SELECT id FROM FraktionsCars WHERE id='%i'",i);
mysql_function_query(dbhandle,query,false,"","");
mysql_store_result();
if(mysql_num_rows()==0)
{
pAuto=i;
return pAuto;
}
}
return pAuto;
}
PHP код:
C:\Users\asdasd\Desktop\SAMP Kunden\DevdogVideos\gamemodes\script.pwn(1890) : error 033: array must be indexed (variable "data")