user data won't save in database again.. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: user data won't save in database again.. (
/showthread.php?tid=576817)
user data won't save in database again.. -
DarkLored - 07.06.2015
Hi, so I simply added some stuff to my SQLite saving system and it suddenly stopped working after adding the things up.
I got an idea of where the problem might be at but I can't seem to find the problem directly.
pawn Код:
Database = db_open("server.db");
db_query(Database, "PRAGMA synchronous = OFF");
new Query[500];
strcat(Query, "CREATE TABLE IF NOT EXISTS `users` (`userid` INTEGER PRIMARY KEY AUTOINCREMENT,`username` VARCHAR(24) COLLATE NO CASE, `password` VARCHAR(129), `score` INTEGER NOT NULL DEFAULT 0,", sizeof(Query));
strcat(Query, "`money` INTEGER NOT NULL DEFAULT 0,`admin` INTEGER NOT NULL DEFAULT 0, `vip` INTEGER NOT NULL DEFAULT 0, `kills` INTEGER NOT NULL DEFAULT 0,", sizeof(Query));
strcat(Query, "`deaths` INTEGER NOT NULL DEFAULT 0)", sizeof(Query));
db_query(Database, Query);
Re: user data won't save in database again.. -
DarkLored - 07.06.2015
bump. Anyone has any idea how to fix this problem?
Re: user data won't save in database again.. -
Konstantinos - 07.06.2015
It's
COLLATE NOCASE, you have a space between NO CASE.
Moreover, remove ` ` around fields so you can reduce the query, they are not needed.
Re: user data won't save in database again.. -
DarkLored - 07.06.2015
Thanks, Konstanitinos. +rep