[Help] Again me and MySQL
#1

Sorry for again disturbing you with my mysql, but:

Код:
SA-MP Server: 0.3c R2

Exception At Address: 0x100042EA

Registers:
EAX: 0x00000000	EBX: 0x0131026C	ECX: 0x0012FD28	EDX: 0x00000000
ESI: 0x010DCF60	EDI: 0x010DCF60	EBP: 0x0012FD14	ESP: 0x0012FCE0
EFLAGS: 0x00010206

Stack:

+0000: 0x010DCF60   0x00000000   0x0012FD24   0x010DCF60
+0010: 0x0131026C   0x0012FD67   0x7FFFFFBF   0x0012FD28
+0020: 0x00000042   0x003C0000   0x00000008   0x0133DD0C
+0030: 0x00000000   0x0012FDB8   0x10007820   0x00000000
+0040: 0x0012FD28   0x00000004   0x636E7546   0x6E6F6974
+0050: 0x796D203A   0x5F6C7173   0x72657571   0x61632079
+0060: 0x64656C6C   0x65687720   0x6F6E206E   0x6F632074
+0070: 0x63656E6E   0x20646574   0x61206F74   0x6420796E
+0080: 0x62617461   0x00657361   0x00000F80   0x004841F4
+0090: 0x004F52D7   0x00000FFF   0x00000000   0x010DCF60
+00A0: 0x01342324   0x0012FD9C   0x010DCF60   0x01342324
+00B0: 0x010DCF60   0x01342324   0x004867F1   0x0134234C
+00C0: 0x004F5258   0x00000000   0x00000000   0xE8030986
+00D0: 0x00000000   0x010DCF60   0x0131477C   0x00401096
+00E0: 0x010DCF60   0x01342338   0x013152D0   0x00402BB3
+00F0: 0x010DCF60   0x00000012   0x0012FDF0   0x01342338
+0100: 0x004F62C0   0x010DCF60   0x00000001   0x00000000
+0110: 0x00000001   0x0002D054   0x0002D068   0x0002D2B0
+0120: 0x000292B4   0x0002D294   0x000292B4   0x0131026C
+0130: 0x013152D0   0x00000000   0x0130FD28   0x00005064
Again and again, tried so much ( Strickkid's plugin )

Serverlogs:

Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3c R2, ©2005-2011 SA-MP Team

[16:33:31] filterscripts = ""  (string)
[16:33:31] 
[16:33:31] Server Plugins
[16:33:31] --------------
[16:33:31]  Loading plugin: mysql
[16:33:31]  SA:MP MySQL Plugin v2.1.1 Loaded.
[16:33:31]   Loaded.
[16:33:31]  Loaded 1 plugins.

[16:33:31] [MySQL] Thread running. Threadsafe: Yes.
[16:33:32] 
[16:33:32] Filter Scripts
[16:33:32] ---------------
[16:33:32]   Loaded 0 filter scripts.
I thought it's 'cause of the OnGameModeInit:

Код:
public OnGameModeInit()
{
	Serverlog("Server wird gestartet...");
	mysql_init(LOG_ALL, 1);
	MySQL_Connect();
	SetGameModeText("Version 1.0 Beta");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	SetTimer("MySQL_Connect", 5000, true);
	Serverlog("Server erfolgreich gestartet !");
	return 1;
}
Since I addet the public Serverlog()

Код:
function Serverlog(log[])
{
	new year, month, day, hour, minute, sec;
	getdate(year, month, day);
	gettime(hour, minute, sec);
	new query[128];
	format(query, 128, "INSERT INTO serverlogs (year, month, day, hour, min, action) VALUES ('%d', '%d', '%d', '%d', '%d', '%s')", year, month, day, hour, minute, log);
	return mysql_query(query);
}
And at least a dumb of the serverlogs - table:

Код:
-- phpMyAdmin SQL Dump
-- version 3.3.6
-- http://www.phpmyadmin.netnl6740a3e4cda4a...0.63698882-- Host: mysql.lima-city.de:3306
-- Erstellungszeit: 12. Juni 2011 um 16:42
-- Server Version: 5.1.37
-- PHP-Version: 5.2.10-2ubuntu6.9

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Datenbank: `db_178617_1`
--

-- --------------------------------------------------------

--
-- Tabellenstruktur fьr Tabelle `serverlogs`
--

CREATE TABLE IF NOT EXISTS `serverlogs` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `year` int(4) NOT NULL,
  `month` int(2) NOT NULL,
  `day` int(2) NOT NULL,
  `hour` int(2) NOT NULL,
  `min` int(2) NOT NULL,
  `action` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Serverlogs des Servers' AUTO_INCREMENT=1 ;

--
-- Daten fьr Tabelle `serverlogs`
--
Hoster: lima-city.de

Can someone help me pls ? :S

Tion
Reply
#2

Quote:
Originally Posted by Tion
Посмотреть сообщение
Код:
public OnGameModeInit()
{
	Serverlog("Server wird gestartet...");
	mysql_init(LOG_ALL, 1);
	MySQL_Connect();
	SetGameModeText("Version 1.0 Beta");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	SetTimer("MySQL_Connect", 5000, true);
	Serverlog("Server erfolgreich gestartet !");
	return 1;
}
I'm more than sure MySQL_Connect has to be called just once.
Reply
#3

Yes, It has an mysql_ping check inside
but I have to connect to mysql-server bevor I start using a query :me dumbaz:
# Closerequest
Tion
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)