SA-MP Forums Archive
Again.. Auto creating tables.. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Again.. Auto creating tables.. (/showthread.php?tid=522452)



Again.. Auto creating tables.. - biker122 - 27.06.2014

I tried to use "CREATE TABLE IF NOT EXISTS" func and I got an error on this:
pawn Код:
mysql_format(MySQL, gQuery, 128,
            "CREATE TABLE IF NOT EXISTS `"Users_Table"` ("\
              "`AccountID` int(10) NOT NULL AUTO_INCREMENT,"\
              "`UserName` varchar(25) NOT NULL,"\
              "`Password` varchar(129) NOT NULL,"\
              "`IP` varchar(16) NULL,"\
              "`Level` int(15) NULL,"\
              "`Money` int(15) NULL,"\
              "`Score` int(15) NULL,"\
              "`Kills` int(15) NULL,"\
              "`Deaths` int(15) NULL,"\
              "`Rapes` int(15) NULL,"\
              "`Kidnaps` int(15) NULL,"\
              "`Robberys` int(15) NULL,"\
              "`Ropes` int(15) NULL,"\
              "`C4` int(15) NULL,"\
              "PRIMARY KEY (`AccountID`)"\
            ") ENGINE=InnoDB DEFAULT CHARSET=latin1;");
    mysql_tquery(MySQL, gQuery, "OnTableCreate", "");
Код:
C:\Users\Matt\Desktop\MP-Related\SAMP 0.3z Server Package\gamemodes\SACNR.pwn(143 -- 159) : error 075: input line too long (after substitutions)
Thanks in advance!


Re : Again.. Auto creating tables.. - Clad - 27.06.2014

This error does tell you the Line is too long, Just make it shorter .


Re: Again.. Auto creating tables.. - biker122 - 27.06.2014

I'm just starting off on these auto creation. hence, i don't know how to do this o.o
Would be great if you could show me something..


Re: Again.. Auto creating tables.. - Vince - 27.06.2014

Frankly, I think creating tables inside the mode is just stupid. They are likely only created once in the lifetime of the server.


Re: Again.. Auto creating tables.. - biker122 - 27.06.2014

Quote:
Originally Posted by Vince
Посмотреть сообщение
Frankly, I think creating tables inside the mode is just stupid. They are likely only created once in the lifetime of the server.
So, do you suggest me to create tables directly on the database? Thought this in the beginning, but I was just thinking on how I can fix these types of problems (if i face one on future)