06.11.2011, 13:35
I have a problem with the mysql_fetch_field() function:
This code is in OnGameModeInit() and first during execution mysql_fetch_field() crash the server.
Last lines in mysql.log:
When you first start everything works well, the crash occurs when you restart (gmx).
P.S. Sorry for my bad English
Код:
new query[256],val[32],idx; while(idx < MAX_INTERIORS) { format(query,256,"SELECT * FROM itr WHERE id=%d",idx); mysql_query(query); mysql_store_result(); mysql_fetch_field("ix",val);II[idx][IntX] = floatstr(val); mysql_fetch_field("iy",val);II[idx][IntY] = floatstr(val); mysql_fetch_field("iz",val);II[idx][IntZ] = floatstr(val); mysql_free_result(); idx++; }
Last lines in mysql.log:
Код:
[Sun Nov 06 16:18:34 2011] Function: mysql_query executed: "SELECT * FROM itr WHERE id=0" with result: "0". [Sun Nov 06 16:18:34 2011] Function: mysql_store_result executed with result: "1" [Sun Nov 06 16:18:34 2011] Function: mysql_fetch_field executed.
P.S. Sorry for my bad English