23.07.2010, 16:00
i have code:
wheen i on server i get mysql_log.txt:
server log.txt :
Why no add car in game?
what wrong?
Код:
#include <mysql> public OnGameModeInit() { mysql_log(1); mysql_connect("localhost", "root", "SLAPTA", "samp"); mysql_query("SELECT * FROM car"); mysql_store_result(); new Data[50]; if(mysql_num_rows() > 0) { while(mysql_fetch_row(Data, "|")) { print(Data); } } mysql_free_result(); return 1; }
Код:
Connected (0) to root @ localhost via TCP/IP. MySQL version 5.0.16-nt. [01/01/02 03:44:35] Function: 'mysql_query' executed: "SELECT * FROM car" with result: "0". [01/01/02 03:44:35] Function: 'mysql_num_rows' called with result: "1". [01/01/02 03:44:35] Function: 'mysql_fetch_row' called with result: "AddStaticVehicle(587,2049.7656,1528.6237,10.3977,270.1695,53,1); // ".
Код:
v0.3a R8, ©2005-2010 SA-MP Team [03:44:35] [03:44:35] Server Plugins [03:44:35] -------------- [03:44:35] Loading plugin: mysql [03:44:35] SA:MP MySQL Plugin 1.2.1 Loaded. [03:44:35] Loaded. [03:44:35] Loaded 1 plugins. [03:44:35] MySQL: Query thread running. Thread safe: Yes. [03:44:35] [03:44:35] Filter Scripts [03:44:35] --------------- [03:44:35] Loading filter script 'base.amx'... [03:44:35] --Base FS loaded. [03:44:35] Loading filter script 'gl_actions.amx'... [03:44:35] Loading filter script 'gl_property.amx'... [03:44:35] ----------------------------------- [03:44:35] Grand Larceny Property Filterscript [03:44:35] ----------------------------------- [03:44:35] Loading filter script 'gl_realtime.amx'... [03:44:35] Loading filter script 'medit.amx'... [03:44:35] [03:44:35] San Andreas: Map Editor [03:44:35] by mabako [03:44:35] [03:44:35] Loading filter script 'vartai.amx'... [03:44:35] Loaded 6 filter scripts. [03:44:35] MySQL: Connected (0) to root @ localhost via TCP/IP. MySQL version 5.0.16-nt. [03:44:35] AddStaticVehicle(587,2049.7656,1528.6237,10.3977,270.1695,53,1); // [03:44:35] Reading File: blank [03:44:35] Reading File: properties/houses.txt [03:44:35] Reading File: properties/businesses.txt [03:44:35] Reading File: properties/banks.txt [03:44:35] Reading File: properties/police.txt [03:44:35] ---------------------------------- [03:44:35] Running LVDM ~MoneyGrub [03:44:35] Coded By [03:44:35] Jax [03:44:35] ----------------------------------
what wrong?