31.03.2013, 15:58
I was doing this and that and, the server crashes!
Tried some stuff and found out, that my "LoadBusiness" function crashes it (without it used it works). But I don't see whats wrong with it,please take a look
Its only called on GameModeInit.
Tried some stuff and found out, that my "LoadBusiness" function crashes it (without it used it works). But I don't see whats wrong with it,please take a look
pawn Код:
stock LoadBusiness()
{
for(new i; i<MAX_BUSINESS; i++)
{
new query[64],string[64];
format(query,sizeof(query),"SELECT * FROM `Business` WHERE bizid = %d",i);
mysql_query(query);
mysql_store_result();
if(mysql_num_rows() != 0)
{
mysql_fetch_row_format(query,"|");
sscanf(query,"p<|>e<ds[64]dds[64]dddffffffdds[24]d>",BizInfo[i]);
if(BizInfo[i][Owned]==0) {format(string,sizeof(string),"Verslas parduodamas\nKaina %d",BizInfo[i][Price]);}
else if(BizInfo[i][Owned]>0) {format(string,sizeof(string),"%s\nIejimo kaina %d",BizInfo[i][BizName],BizInfo[i][EntrancePrice]);}
BizInfo[i][HouseLabel]=Create3DTextLabel(string,0xFFFF00FF,BizInfo[i][enX],BizInfo[i][enY],BizInfo[i][enZ],25,BizInfo[i][VirtualWorld]);
}
}
mysql_free_result();
return 1;
}