SetupPlayerTable()
{
mysql_tquery(g_SQL, "CREATE TABLE IF NOT EXISTS `players` (`id` int(11) NOT NULL AUTO_INCREMENT,`username` varchar(24) NOT NULL,`password` char(64) NOT NULL,`salt` char(16) NOT NULL,`kills` mediumint(8) NOT NULL DEFAULT '0',`deaths` mediumint(8) NOT NULL DEFAULT '0',`respect` mediumint(8) NOT NULL DEFAULT '0',`score` mediumint(8) NOT NULL DEFAULT '0',`points` mediumint(8) NOT NULL DEFAULT '0',`admin` mediumint(8) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `username` (`username`))");
return 1;
}
SetupPlayerTable()
{
mysql_tquery(g_SQL, "CREATE TABLE IF NOT EXISTS `players` (`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(24) NOT NULL,
`password` char(64) NOT NULL,
`salt` char(16) NOT NULL,
`kills` mediumint(8) NOT NULL DEFAULT '0',
`deaths` mediumint(8) NOT NULL DEFAULT '0',
`respect` mediumint(8) NOT NULL DEFAULT '0',
`score` mediumint(8) NOT NULL DEFAULT '0',
`points` mediumint(8) NOT NULL DEFAULT '0',
`admin` mediumint(8) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `username` (`username`))");
return 1;
}
mysql_tquery(g_SQL, "CREATE TABLE IF NOT EXISTS `tablename`
mysql_tquery(g_SQL, "CREATE TABLE IF NOT EXISTS `players` (`id` int(11) NOT NULL AUTO_INCREMENT,`username` varchar(24) NOT NULL,`password` char(64) NOT NULL,`salt` char(16) NOT NULL,`kills` mediumint(8) NOT NULL DEFAULT '0',`deaths` mediumint(8) NOT NULL DEFAULT '0',`respect` mediumint(8) NOT NULL DEFAULT '0',`score` mediumint(8) NOT NULL DEFAULT '0',`points` mediumint(8) NOT NULL DEFAULT '0',`admin` mediumint(8) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `username` (`username`))");
mysql_tquery(g_SQL, "CREATE TABLE IF NOT EXISTS `players` (`duelswin` mediumint(8) NOT NULL DEFAULT '0',`duelslost` mediumint(8) NOT NULL DEFAULT '0')");
`field_name` int(11) NOT NULL,
PHP код:
You can create another table by this: PHP код:
|
C:\Users\Wallen\Desktop\LS DM\gamemodes\DBv1.pwn(3086) : error 037: invalid string (possibly non-terminated string) C:\Users\Wallen\Desktop\LS DM\gamemodes\DBv1.pwn(3086) : error 017: undefined symbol "CREATE" C:\Users\Wallen\Desktop\LS DM\gamemodes\DBv1.pwn(3086) : error 017: undefined symbol "TABLE" C:\Users\Wallen\Desktop\LS DM\gamemodes\DBv1.pwn(3086) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
mysql_tquery(g_SQL, "CREATE TABLE IF NOT EXISTS `players` (`id` int(11) NOT NULL AUTO_INCREMENT, \
`username` varchar(24) NOT NULL, \
`password` char(64) NOT NULL, \
`salt` char(16) NOT NULL, \
`kills` mediumint(8) NOT NULL DEFAULT '0', \
`deaths` mediumint(8) NOT NULL DEFAULT '0', \
`respect` mediumint(8) NOT NULL DEFAULT '0', \
...
SetupPlayerTable()
{
mysql_tquery(g_SQL, "CREATE TABLE IF NOT EXISTS `players` (`id` int(11) NOT NULL AUTO_INCREMENT, \
`username` varchar(24) NOT NULL,\
`password` char(64) NOT NULL, \
`salt` char(16) NOT NULL, \
`kills` mediumint(8) NOT NULL DEFAULT '0', \
`deaths` mediumint(8) NOT NULL DEFAULT '0', \
`respect` mediumint(8) NOT NULL DEFAULT '0', \
`score` mediumint(8) NOT NULL DEFAULT '0', \
`points` mediumint(8) NOT NULL DEFAULT '0', \
`admin` mediumint(8) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `username` (`username`))");
return 1;
}
C:\Users\Wallen\Desktop\LS DM\gamemodes\DBv1.pwn(3094) : error 075: input line too long (after substitutions) C:\Users\Wallen\Desktop\LS DM\gamemodes\DBv1.pwn(3095) : error 037: invalid string (possibly non-terminated string) C:\Users\Wallen\Desktop\LS DM\gamemodes\DBv1.pwn(3095) : error 017: undefined symbol "CREATE" C:\Users\Wallen\Desktop\LS DM\gamemodes\DBv1.pwn(3095) : error 017: undefined symbol "TABLE" C:\Users\Wallen\Desktop\LS DM\gamemodes\DBv1.pwn(3095) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
`points` mediumint(8) NOT NULL DEFAULT '0', \
`admin` mediumint(8) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `username` (`username`))");
new query[600] = "CREATE TABLE IF NOT EXISTS `players` (`id` int(11) NOT NULL AUTO_INCREMENT, \
`username` varchar(24) NOT NULL,\
`password` char(64) NOT NULL, \
`salt` char(16) NOT NULL,";
strcat(query, "`kills` mediumint(8) NOT NULL DEFAULT '0', \
`deaths` mediumint(8) NOT NULL DEFAULT '0', \
`respect` mediumint(8) NOT NULL DEFAULT '0', \
`score` mediumint(8) NOT NULL DEFAULT '0',");
strcat(query, "`points` mediumint(8) NOT NULL DEFAULT '0', \
`admin` mediumint(8) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY (`username`))");
mysql_tquery(g_SQL, query);
SetupPlayerTable()
{
new query[1500];
strcat(query, " CREATE TABLE IF NOT EXISTS `players` (`id` int(11) NOT NULL AUTO_INCREMENT, \
`username` varchar(24) NOT NULL,\
`password` char(64) NOT NULL, \
`salt` char(16) NOT NULL, \
`kills` mediumint(8) NOT NULL DEFAULT '0', \
`deaths` mediumint(8) NOT NULL DEFAULT '0', \
`respect` mediumint(8) NOT NULL DEFAULT '0', \
`score` mediumint(8) NOT NULL DEFAULT '0',\
`duelsw` mediumint(8) NOT NULL DEFAULT '0',\
`duelsl` mediumint(8) NOT NULL DEFAULT '0',\
`points` mediumint(8) NOT NULL DEFAULT '0', \
`admin` mediumint(8) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY (`username`))");
mysql_tquery(g_SQL, query);
return 1;
}
C:\Users\Wallen\Desktop\LS DM\gamemodes\DBv1.pwn(3097) : error 075: input line too long (after substitutions) C:\Users\Wallen\Desktop\LS DM\gamemodes\DBv1.pwn(3098) : error 037: invalid string (possibly non-terminated string) C:\Users\Wallen\Desktop\LS DM\gamemodes\DBv1.pwn(3098) : error 017: undefined symbol "CREATE" C:\Users\Wallen\Desktop\LS DM\gamemodes\DBv1.pwn(3098) : error 017: undefined symbol "TABLE" C:\Users\Wallen\Desktop\LS DM\gamemodes\DBv1.pwn(3098) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.