Help sqlite help
#1

Respond to the other messages and this message does not

PHP код:
C:\gamemodes\sqlite.pwn(2074) : error 075input line too long (after substitutions
C:\Users\gamemodes\sqlite.pwn(2075) : error 037invalid string (possibly non-terminated string
C:\Users\gamemodes\sqlite.pwn(2075) : error 017undefined symbol "CREATE" 
C:\Users\gamemodes\sqlite.pwn(2075) : error 017undefined symbol "TABLE" 
C:\Users\gamemodes\sqlite.pwn(2075) : fatal error 107too many error messages on one line 
Reply
#2

"input line too long (after substitutions) "

strcat?

(show us that function/cmd)
Reply
#3

Quote:
Originally Posted by TheRohlikar
Посмотреть сообщение
"input line too long (after substitutions) "

strcat?

(show us that function/cmd)
PHP код:
ZLDB db_open(BaseSQLite);
      
db_query(ZLDB"CREATE TABLE IF NOT EXISTS `USERS` (`ID` INTEGER PRIMARY KEY AUTOINCREMENT,\
                                                `NICK` VARCHAR(25) NOT NULL,\
                                                 `PASS` VARCHAR(20) NOT NULL,\
                                                `COLORNICK` INT NOT NULL,\
                                                 `MONEY` INT NOT NULL,\
                                                `SCOREFREEROAM` INT NOT NULL,\
                                                `NIVEL` INT NOT NULL,\
                                                `RP` INT NOT NULL,\
                                                `PD` INT NOT NULL,\
                                                `RESPETO` INT NOT NULL,\
                                                `ASESINATOS` INT NOT NULL,\
                                                `MUERTES` INT NOT NULL,\
                                                `LEVEL` INT NOT NULL,\
                                                `HEADSHOT` INT NOT NULL,\
                                                `RACEWIN` INT NOT NULL,\
                                                `RACELOSE` INT NOT NULL,\
                                                `DUELOLOSE` INT NOT NULL,\
                                                `VIP` INT NOT NULL,\
                                                `FECHAREGISTRO` INT NOT NULL)"
); 
Reply
#4

yep, use "strcat"...
Reply
#5

Quote:
Originally Posted by TheRohlikar
Посмотреть сообщение
yep, use "strcat"...
Could you give me an example, please? It's just that I can not
Reply
#6

Quote:
Originally Posted by Th3N0oB
Посмотреть сообщение
Could you give me an example, please? It's just that I can not
Just go into samp-wiki: https://sampwiki.blast.hk/wiki/Strcat
Reply
#7

Quote:
Originally Posted by Jelly23
Посмотреть сообщение
I do not mean that kind of example, I mean how would function
Reply
#8

Quote:
Originally Posted by Th3N0oB
Посмотреть сообщение
I do not mean that kind of example, I mean how would function
"This function concatenates (joins together) two strings into the destination string."

Ex:

PHP код:
new example[4];
strcatexample"A" );
strcatexample"B" );
strcatexample"C" ); 
it would put them all together, like "ABC".
Reply
#9

strcat is one function..
means:

strcat(SQLite,"`ID` INTEGER PRIMARY KEY AUTOINCREMENT,");
strcat(SQLite, "....");

got it ?
Reply
#10

Quote:
Originally Posted by TheRohlikar
Посмотреть сообщение
strcat is one function..
means:

strcat(SQLite,"`ID` INTEGER PRIMARY KEY AUTOINCREMENT,");
strcat(SQLite, "....");

got it ?
PHP код:
OnGameModeInit()
{
new 
SQLite[500];
    static 
DBResult:db_result;
     
ZLDB db_open(SQL);
    
db_result db_query(ZLDBSQLite);
    
strcat(SQLite,"CREATE TABLE IF NOT EXISTS `USERS`(`ID` INTEGER PRIMARY KEY AUTOINCREMENT),");
    
strcat(SQLite,"`ID` INTEGER PRIMARY KEY AUTOINCREMENT,");
    
strcat(SQLite,"`NICK`           VARCHAR(25) NOT NULL,");
    
strcat(SQLite,"`PASS`           VARCHAR(20) NOT NULL,");
    
strcat(SQLite,"`COLORNICK`      INTEGER NOT NULL,");
    
strcat(SQLite,"`MONEY`           INTEGER NOT NULL,");
    
strcat(SQLite,"`SCOREFREEROAM`  INTEGER NOT NULL,");
    
strcat(SQLite,"`NIVEL`          INTEGER NOT NULL,");
    
strcat(SQLite,"`RP`             INTEGER NOT NULL,");
    
strcat(SQLite,"`PD`             INTEGER NOT NULL,");
    
strcat(SQLite,"`RESPETO`        INTEGER NOT NULL,");
    
strcat(SQLite,"`ASESINATOS`     INTEGER NOT NULL,");
    
strcat(SQLite,"`MUERTES`        INTEGER NOT NULL,");
    
strcat(SQLite,"`LEVEL`          INTEGER NOT NULL,");
    
strcat(SQLite,"`HEADSHOT`       INTEGER NOT NULL,");
    
strcat(SQLite,"`RACEWIN`        INTEGER NOT NULL,");
    
strcat(SQLite,"`RACELOSE`       INTEGER NOT NULL,");
    
strcat(SQLite,"`DUELOLOSE`      INTEGER NOT NULL,");
    
strcat(SQLite,"`VIP`            INTEGER NOT NULL,");
    
strcat(SQLite,"`FECHAREGISTRO`  INTEGER NOT NULL");
    
db_free_result(db_result);
        return 
1;
        } 
I did it this way, but I do not want to boot the server, maybe I did it wrong?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)