03.11.2012, 16:19
Hi yesterday I've decided to try using a mysql register system for my server and I've downloaded BReg I also downloaded wamp server and installed it, I created a database and I defined it's name here:
and I started the server, here is the server log:
I didn't create any tables because I thought that
should do it by itself but it didn't, the fs also must print one of this 2 messages:
But it didn't as you see in the server log. Do you have any ideas why it's not working ?
pawn Код:
#define mysql_database "BReg"
Код:
---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3e-R2, ©2005-2012 SA-MP Team [01:13:10] [01:13:10] Server Plugins [01:13:10] -------------- [01:13:10] Loading plugin: sscanf [01:13:10] [01:13:10] =============================== [01:13:10] sscanf plugin loaded. [01:13:10] © 2009 Alex "******" Cole [01:13:10] =============================== [01:13:10] Loaded. [01:13:10] Loading plugin: mysql [01:13:10] > MySQL plugin R6-2 successfully loaded. [01:13:10] Loaded. [01:13:10] Loading plugin: Whirlpool [01:13:10] [01:13:10] ================== [01:13:10] [01:13:10] Whirlpool loaded [01:13:10] [01:13:10] ================== [01:13:10] [01:13:10] Loaded. [01:13:10] Loaded 3 plugins. [01:13:10] [01:13:10] Filterscripts [01:13:10] --------------- [01:13:10] Loading filterscript 'BREG.amx'... [01:13:10] Loaded 1 filterscripts. [01:13:10] Loaded 3 vehicles from: vehicles/trains.txt [01:13:10] Loaded 3 vehicles from: vehicles/pilots.txt [01:13:10] Loaded 15 vehicles from: vehicles/lv_law.txt [01:13:10] Loaded 39 vehicles from: vehicles/lv_airport.txt [01:13:10] Loaded 255 vehicles from: vehicles/lv_gen.txt [01:13:10] Loaded 38 vehicles from: vehicles/sf_law.txt [01:13:10] Loaded 35 vehicles from: vehicles/sf_airport.txt [01:13:10] Loaded 353 vehicles from: vehicles/sf_gen.txt [01:13:10] Loaded 24 vehicles from: vehicles/ls_law.txt [01:13:10] Loaded 37 vehicles from: vehicles/ls_airport.txt [01:13:10] Loaded 98 vehicles from: vehicles/ls_gen_inner.txt [01:13:10] Loaded 389 vehicles from: vehicles/ls_gen_outer.txt [01:13:10] Loaded 71 vehicles from: vehicles/whetstone.txt [01:13:10] Loaded 168 vehicles from: vehicles/bone.txt [01:13:10] Loaded 61 vehicles from: vehicles/flint.txt [01:13:10] Loaded 96 vehicles from: vehicles/tierra.txt [01:13:10] Loaded 96 vehicles from: vehicles/red_county.txt [01:13:10] Total vehicles from files: 1781 [01:13:10] --------------------------------------- [01:13:10] Running Grand Larceny - by the SA-MP team [01:13:10] --------------------------------------- [01:13:10] Number of vehicle models: 173
pawn Код:
mysql_query(
"CREATE TABLE IF NOT EXISTS `Accounts` ("\
"`AccID` int(10) NOT NULL AUTO_INCREMENT,"\
"`Username` varchar(24) NOT NULL,"\
"`Password` varchar(64) NOT NULL,"\
"`IP` varchar(16) NULL,"\
"`Money` int(15) NULL,"\
"`Score` int(15) NULL,"\
"`Kills` int(15) NULL,"\
"`Deaths` int(15) NULL,"\
"PRIMARY KEY (`AccID`)"\
") ENGINE=InnoDB DEFAULT CHARSET=latin1;");
pawn Код:
if(mysql_ping() > -1) return print("::BReg:: MySQL connection to database succeeded!");
else print("::BReg:: MySQL connection to database failed. Please check your database settings!");