input line too long (after substitutions)
#1

I am getting this error while trying to implement a SQLite database.

Код:
db_query(database, "CREATE TABLE IF NOT EXISTS users (userid INTEGER PRIMARY KEY AUTOINCREMENT, username VARCHAR(24) COLLATE NOCASE, password VARCHAR(129), score INTEGER DEFAULT 0 NOT NULL, cash INTEGER DEFAULT 0 NOT NULL, bank_cash INTEGER DEFAULT 0 NOT NULL, admin INTEGER DEFAULT 0 NOT NULL, kills INTEGER DEFAULT 0 NOT NULL, deaths INTEGER DEFAULT 0 NOT NULL, jail_time INTEGER DEFAULT 0 NOT NULL, rp INTEGER DEFAULT 0 NOT NULL, vip INTEGER DEFAULT 0 NOT NULL, cop_rank INTEGER DEFAULT 0 NOT NULL, army INTEGER DEFAULT 0 NOT NULL)");
How exactly do I fit all this in, and/or how would I split all this into multiple lines, and still have it work?
Reply
#2

PHP код:
db_query(database"CREATE TABLE IF NOT EXISTS users (userid INTEGER PRIMARY KEY AUTOINCREMENT, username VARCHAR(24) COLLATE NOCASE, password VARCHAR(129), 
score INTEGER DEFAULT 0 NOT NULL, 
cash INTEGER DEFAULT 0 NOT NULL, bank_cash INTEGER DEFAULT 0 NOT NULL, 
admin INTEGER DEFAULT 0 NOT NULL, kills INTEGER DEFAULT 0 NOT NULL, deaths INTEGER DEFAULT 0 NOT NULL, jail_time INTEGER DEFAULT 0 NOT NULL, 
rp INTEGER DEFAULT 0 NOT NULL, vip INTEGER DEFAULT 0 NOT NULL, cop_rank INTEGER DEFAULT 0 NOT NULL, army INTEGER DEFAULT 0 NOT NULL)"
); 
Try this but why don't you create the table manually..?
Reply
#3

Exactly, It'd be better if you create the table manually.
Reply
#4

Quote:
Originally Posted by How to Remove
PHP код:
new string[952];
strcat(string"CREATE TABLE IF NOT EXISTS users (userid INTEGER PRIMARY KEY AUTOINCREMENT,");
strcat(string"username VARCHAR(24) COLLATE NOCASE, password VARCHAR(129), score INTEGER DEFAULT 0 NOT NULL, ");
strcat(string"cash INTEGER DEFAULT 0 NOT NULL, bank_cash INTEGER DEFAULT 0 NOT NULL, ");
strcat(string"admin INTEGER DEFAULT 0 NOT NULL, kills INTEGER DEFAULT 0 NOT NULL, deaths INTEGER DEFAULT 0 NOT NULL, ");
strcat(string"jail_time INTEGER DEFAULT 0 NOT NULL,rp INTEGER DEFAULT 0 NOT NULL, vip INTEGER DEFAULT 0 NOT NULL, ");
strcat(string"cop_rank INTEGER DEFAULT 0 NOT NULL, army INTEGER DEFAULT 0 NOT NULL)");
db_query(databasestring
And doing it manually would be better, like the above guys mentioned.
Reply
#5

Use zeex compiler, it'll fix your problem.
https://github.com/Zeex/pawn/releases
Reply
#6

I'll just make it manually. Honestly didn't even though that was an option. I have just begun to work with SQL.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)