new Query[500];
new MySQL:SqL;
public OnGameModeInit()
{
SqL = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS, SQL_DB);
mysql_log(WARNING | ERROR);
if(!mysql_errno(SqL))
{
strcat(SqL, "CREATE TABLE IF NOT EXISTS `contas`\
(`id`INT(11) AUTO_INCREMENT PRIMARY KEY,\
`usuario`varchar(24) NOT NULL,\
`senha` varchar(20) NOT NULL,\
`skin` INT(20) NOT NULL,\
`aAdmin` INT(11) NOT NULL,\
`Admin` INT(11) NOT NULL\
`Gasolina` INT(11) NOT NULL,\
`Etanol` INT(11) NOT NULL,\
`Diesel` INT(11) NOT NULL,\
`GNV` INT(11) NOT NULL,\
`Dinheiro` INT(11) NOT NULL,\
`sBancario` INT(11) NOT NULL,\
`Profissao` INT(11) NOT NULL,\
`Cidade` INT(11) NOT NULL,\
`cX` float NOT NULL,\
`cY` float NOT NULL,\ //Linha do erro
`cZ` float NOT NULL)");//Linha do erro
mysql_query(SqL, Query, false);
print("->> Conectado com sucesso ao |BANCO de DADOS|.");
}
else print("<<- Erro ao conectar ao x|BANCO de DADOS|x.");
return 1;
}
error 075: input line too long (after substitutions) error 035: argument type mismatch (argument 1) error 017: undefined symbol "CREATE" error 017: undefined symbol "TABLE" fatal error 107: too many error messages on one line
Use esse compilador:
https://sampforum.blast.hk/showthread.php?pid=2768123#pid2768123 |
new Query[500];
SqL = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS, SQL_DB);
mysql_log(WARNING | ERROR);
if(!mysql_errno(SqL))
{
format(Query, 500, "CREATE TABLE IF NOT EXISTS contas (`id`INT(11) AUTO_INCREMENT PRIMARY KEY, `usuario`varchar(24) NOT NULL, `senha` varchar(20) NOT NULL, `skin` INT(20) NOT NULL, `aAdmin` INT(11) NOT NULL, `Gasolina` INT(11) NOT NULL, `Etanol` INT(11) NOT NULL, `Diesel` INT(11) NOT NULL, `GNV` INT(11) NOT NULL, `Dinheiro` INT(11) NOT NULL, `sBancario` INT(11) NOT NULL, `Profissao` INT(11) NOT NULL, `Cidade` INT(11) NOT NULL, `cX` float NOT NULL, `cY` float NOT NULL, `cZ` float NOT NULL)");
mysql_query(SqL, Query, false);
}
strcat(SqL, "CREATE TABLE IF NOT EXISTS `contas`\
(`id`INT(11) AUTO_INCREMENT PRIMARY KEY,\
`usuario`varchar(24) NOT NULL,\
`senha` varchar(20) NOT NULL,\
`skin` INT(20) NOT NULL,\
`aAdmin` INT(11) NOT NULL,\
`Admin` INT(11) NOT NULL,\
`Gasolina` INT(11) NOT NULL,\
`Etanol` INT(11) NOT NULL,\
`Diesel` INT(11) NOT NULL,\
`GNV` INT(11) NOT NULL,\
`Dinheiro` INT(11) NOT NULL,\
`sBancario` INT(11) NOT NULL,\
`Profissao` INT(11) NOT NULL,\
`Cidade` INT(11) NOT NULL,\
`cX` float NOT NULL,\
`cY` float NOT NULL,\
`cZ` float NOT NULL)");
mysql_query(SqL, Query, false);
new string[512];
strcat(string,"texto aqui, texto aqui, texto aqui, texto aqui, texto aqui, texto aqui, texto aqui, texto aqui, ");
strcat(string,"texto aqui, texto aqui, texto aqui, texto aqui, texto aqui, texto aqui, texto aqui, texto aqui, ");
strcat(string,"texto aqui, texto aqui, texto aqui, texto aqui, texto aqui, texto aqui, texto aqui, texto aqui, ");
mysql_query(string);
strcat(query, "CREATE TABLE IF NOT EXISTS contas(ID int AUTO_INCREMENT PRIMARY KEY, Nome varchar(24) NOT NULL, Senha int NOT NULL, Registro varchar(60) NOT NULL, Score int(20) DEFAULT 0, Admin int(20) DEFAULT 0, Skin int DEFAULT 230, Clan varchar(25) DEFAULT 'Nenhum', ClanL int DEFAULT 0, Dinheiro int(20) DEFAULT 0, Matou int(10) DEFAULT 0, Morreu int(10) DEFAULT 0, IP varchar(20) DEFAULT '255.255.255.255', Banido int(10) DEFAULT 0, Ban_admin varchar(24) DEFAULT 'Ninguem', ");
strcat(query, "Ban_motivo varchar(100) DEFAULT 'Nenhum', Ban_time int DEFAULT 0, Fome float DEFAULT 100.0, Sede float DEFAULT 100.0, Vida float DEFAULT 100.0, Colete float DEFAULT 100.0, pX float DEFAULT 0.0, pY float DEFAULT 0.0, pZ float DEFAULT 0.0, pA float DEFAULT 0.0, pInt int DEFAULT 0, pWorld int DEFAULT 0, Arma0 int DEFAULT 0, Arma1 int DEFAULT 0, Arma2 int DEFAULT 0, Arma0A int DEFAULT 0, Arma1A int DEFAULT 0, Arma2A int DEFAULT 0, LDTime int DEFAULT 0, Exp int DEFAULT 1, ");
strcat(query, "Online int DEFAULT 0, OnlineT int DEFAULT 0)");
tente assim:
PHP код:
PHP код:
se nao der tente dessa forma: PHP код:
PHP код:
|