[MySQL] - Unknown Gamemode
#1

Hey,

I recently implemented MySQL into my script and it compiles without errors and it connects to my DB as it should, but the Gamemode doesn't load properly.

I've fiddled a bit with what could be the error and I figured out that the following query "blocks" for my gamemode to function (returns 'Unknown' at gamemode name etc).

pawn Код:
mysql_query(
            "CREATE TABLE IF NOT EXISTS `Users` ("\
              "`AccID` int(10) NOT NULL AUTO_INCREMENT,"\
              "`Username` varchar(24) NOT NULL,"\
              "`Password` varchar(64) NOT NULL,"\
              "`IP` varchar(16) NULL,"\
              "`Cash` int(20) NULL,"\
              "`Kills` int(20) NULL,"\
              "`Deaths` int(20) NULL,"\
              "`Adminlevel` int(20) NULL,"\
              "`Donator` int(20) NULL,"\
              "`Score` int(20) NULL,"\
              "`Banned` int(20) NULL,"\
              "`Muted` int(20) NULL,"\
              "`MuteTime` int(20) NULL,"\
              "PRIMARY KEY (`AccID`)"\
            ") ENGINE=InnoDB DEFAULT CHARSET=latin1;");
    if(mysql_ping() > -1) return print("::DBCONNECT:: MySQL connection to database succeeded!");

I'm quite new at all this MySQL hype, so I am most likely doing something wrong. If you need any other information, feel free to ask! The one who can help me with this will of course be repped!
Reply
#2

Honestly, I find this a old method to create a table. Might be my opinion but I recommend to create a new table in PHPMyAdmin.
Reply
#3

You're right lol. It made my GameMode load properly after removing it - I guess it doesn't need to check/write those tables at every gamemodeinit xD
Reply
#4

If you still want to do it your way, remove all of the unnecessary double quotes in the middle of the query. It should only be at the beginning and the end.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)