12.10.2014, 15:24
The line is to long so you need to split it up using strcat or format OR you can use Zeex's compiler which raises the line length limit.
This should work:
If you continue getting the same error then you need to split it up even more.
This should work:
pawn Код:
new string[545];
strcat(string, "CREATE TABLE IF NOT EXISTS users (userid INTEGER PRIMARY KEY AUTOINCREMENT, username VARCHAR(24) COLLATE NOCASE, password VARCHAR(129), admin INTEGER DEFAULT 0 NOT NULL");
strcat(string, ", vip INTEGER DEFAULT 0 NOT NULL, money INTEGER DEFAULT 0 NOT NULL, score INTEGER DEFAULT 0 NOT NULL, kills INTEGER DEFAULT 0 NOT NULL, deaths INTEGER DEFAULT 0 NOT NULL");
strcat(string, ", kd INTEGER DEFAULT 0 NOT NULL, banned INTEGER DEFAULT 0 NOT NULL, `X` FLOAT DEFAULT 0.0, 'Y' FLOAT DEFAULT 0.0, 'Z' FLOAT DEFAULT 0.0, INT INTEGER DEFAULT 0 NOT NULL, VWORLD INTEGER DEFAULT 0 NOT NULL");
new DB:Database = db_open("server.db");
db_query(Database, string);