24.08.2014, 07:44
Okay so I'm new to SQLite and I'm using Norrin's Base SQLite gamemode for practicing, My question is,
I'm trying to add new column called "Bait",
But it fails (no "baits" column on SQLite Database Browser).
If I change a column name like "Job" to "Test", it works. Is there any maximum lines in strcat? The strcats are 31 lines.
pawn Код:
// It's on OnGameModeInit!
Database = db_open("database.db");
new string[1024];
strcat(string, "CREATE TABLE IF NOT EXISTS Accounts(");
strcat(string, "UserID INTEGER PRIMARY KEY AUTOINCREMENT,");
strcat(string, "Username VARCHAR(24) COLLATE NOCASE,");
strcat(string, "Password VARCHAR(128),");
strcat(string, "IP VARCHAR(16),");
strcat(string, "Age INTEGER DEFAULT 0 NOT NULL,");
strcat(string, "Rod INTEGER DEFAULT 0 NOT NULL,");
strcat(string, "Job INTEGER DEFAULT 0 NOT NULL,");
strcat(string, "Gender INTEGER DEFAULT 0 NOT NULL,");
strcat(string, "Registered INTEGER DEFAULT 0 NOT NULL,");
strcat(string, "Member INTEGER DEFAULT 0 NOT NULL,");
strcat(string, "Rank INTEGER DEFAULT 0 NOT NULL,");
strcat(string, "Leader INTEGER DEFAULT 0 NOT NULL,");
strcat(string, "Banned INTEGER DEFAULT 0 NOT NULL,");
strcat(string, "BanReason VARCHAR(64),");
strcat(string, "BanExpiry INTEGER DEFAULT 0 NOT NULL,");
strcat(string, "JailTime INTEGER DEFAULT 0 NOT NULL,");
strcat(string, "JailReason VARCHAR(64),");
strcat(string, "NMute INTEGER DEFAULT 0 NOT NULL,");
strcat(string, "RMute INTEGER DEFAULT 0 NOT NULL,");
strcat(string, "AdminLevel INTEGER DEFAULT 0 NOT NULL,");
strcat(string, "SecondaryTask INTEGER DEFAULT 0 NOT NULL,");
strcat(string, "Money INTEGER DEFAULT 0 NOT NULL,");
strcat(string, "PositionX FLOAT DEFAULT 0.0,");
strcat(string, "PositionY FLOAT DEFAULT 0.0,");
strcat(string, "PositionZ FLOAT DEFAULT 0.0,");
strcat(string, "FacingAngle FLOAT DEFAULT 0.0,");
strcat(string, "Interior INTEGER DEFAULT 0 NOT NULL,");
strcat(string, "VirtualWorld INTEGER DEFAULT 0 NOT NULL,");
strcat(string, "Health FLOAT DEFAULT 0.0,");
strcat(string, "Armour FLOAT DEFAULT 0.0,");
strcat(string, "Skin INTEGER DEFAULT 0 NOT NULL)");
db_query(Database, string);
Код:
strcat(string, "Bait INTEGER DEFAULT 0 NOT NULL,"); (( Below VirtualWorld ))
If I change a column name like "Job" to "Test", it works. Is there any maximum lines in strcat? The strcats are 31 lines.
