Mysql 075 Error input line too long
#1

ok, i get the errors what thay mean How to fix it ?
pawn Code:
mysql_connect(mysql_host,mysql_user,mysql_database,mysql_password);
    mysql_query(
            "CREATE TABLE IF NOT EXISTS `Accounts` ("\
              "`AccID` int(10) NOT NULL AUTO_INCREMENT,"\
              "`Username` varchar(24) NOT NULL,"\
              "`Password` varchar(64) NOT NULL,"\
              "`IP` varchar(16) NULL,"\
              "`Money` int(15) NULL,"\
              "`Score` int(15) NULL,"\
              "`Kills` int(15) NULL,"\
              "`Deaths` int(15) NULL,"\
              "`Admin` int(15) NULL,"\
              "`Donator` int(15) NULL,"\
              "`Plantedbombs` int(15) NULL,"\
              "`Defusedbombs` int(15) NULL,"\
              "`Banned` int(15) NULL,"\
              "`Banneddate` varchar(16) NULL,"\
              "`BannedReason` varchar(64) NULL,"\
              "`Bannedby` varchar(24) NULL,"\
              "PRIMARY KEY (`AccID`)"\
            ") ENGINE=InnoDB DEFAULT CHARSET=latin1;");
pawn Code:
C:\Users\Robust\Documents\My Received Files\swat.pwn(4067 -- 4083) : error 075: input line too long (after substitutions)
C:\Users\Robust\Documents\My Received Files\swat.pwn(4084) : warning 215: expression has no effect
C:\Users\Robust\Documents\My Received Files\swat.pwn(4084) : error 001: expected token: ";", but found "`"
C:\Users\Robust\Documents\My Received Files\swat.pwn(4084) : error 029: invalid expression, assumed zero
C:\Users\Robust\Documents\My Received Files\swat.pwn(4084) : error 017: undefined symbol "Bannedby"
C:\Users\Robust\Documents\My Received Files\swat.pwn(4084) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
Reply
#2

You're exceeding the limit into the string you're trying to input as a query; meaning you may need to do this manually or make a string and then copy each part bit by bit.
Reply
#3

pawn Code:
format(Query,sizeof Query," mysql_query(
            "
CREATE TABLE IF NOT EXISTS `Accounts` ("\
              "
`AccID` int(10) NOT NULL AUTO_INCREMENT,"\
              "
`Username` varchar(24) NOT NULL,"\
              "
`Password` varchar(64) NOT NULL,"\
              "
`IP` varchar(16) NULL,"\
              "
`Money` int(15) NULL,"\
              "
`Score` int(15) NULL,"\
              "
`Kills` int(15) NULL,"\
              "
`Deaths` int(15) NULL,"\
              "
`Admin` int(15) NULL,"\
              "
`Donator` int(15) NULL,"\
              "
`Plantedbombs` int(15) NULL,"\
              "
`Defusedbombs` int(15) NULL,"\
              "
`Banned` int(15) NULL,"\
              "
`Banneddate` varchar(16) NULL,"\
              "
`BannedReason` varchar(64) NULL,"\
              "
`Bannedby` varchar(24) NULL,"\
              "
PRIMARY KEY (`AccID`)"\
            "
) ENGINE=InnoDB DEFAULT CHARSET=latin1;");
mysql_query(Query);
If this doesn't work, then use strcat.
Reply
#4

Not working same errors

Example strcat ?
Reply
#5

Quote:
Originally Posted by [MWR]Blood
View Post
pawn Code:
format(Query,sizeof Query," mysql_query(
            "
CREATE TABLE IF NOT EXISTS `Accounts` ("\
              "
`AccID` int(10) NOT NULL AUTO_INCREMENT,"\
              "
`Username` varchar(24) NOT NULL,"\
              "
`Password` varchar(64) NOT NULL,"\
              "
`IP` varchar(16) NULL,"\
              "
`Money` int(15) NULL,"\
              "
`Score` int(15) NULL,"\
              "
`Kills` int(15) NULL,"\
              "
`Deaths` int(15) NULL,"\
              "
`Admin` int(15) NULL,"\
              "
`Donator` int(15) NULL,"\
              "
`Plantedbombs` int(15) NULL,"\
              "
`Defusedbombs` int(15) NULL,"\
              "
`Banned` int(15) NULL,"\
              "
`Banneddate` varchar(16) NULL,"\
              "
`BannedReason` varchar(64) NULL,"\
              "
`Bannedby` varchar(24) NULL,"\
              "
PRIMARY KEY (`AccID`)"\
            "
) ENGINE=InnoDB DEFAULT CHARSET=latin1;");
mysql_query(Query);
If this doesn't work, then use strcat.
That doesn't work all that does is carry the string to the next line (but its the same line really and wont remove the error). You will need to use strcat/format or do several queries.
Reply
#6

Something like:

pawn Code:
new Query[ Size ];

strcat(Query, "mysql_query(CREATE TABLE IF NOT EXISTS `Accounts` (\
                `AccID` int(10) NOT NULL AUTO_INCREMENT,\
                `Username` varchar(24) NOT NULL,\
                `Password` varchar(64) NOT NULL,\
                `IP` varchar(16) NULL,\
                `Money` int(15) NULL,\
                `Score` int(15) NULL,\
                `Kills` int(15) NULL,\");
             
strcat(Query, "
`Deaths` int(15) NULL,\
              `Admin` int(15) NULL,\
              `Donator` int(15) NULL,\
              `Plantedbombs` int(15) NULL,\
              `Defusedbombs` int(15) NULL,\
              `Banned` int(15) NULL,\
              `Banneddate` varchar(16) NULL,\
              `BannedReason` varchar(64) NULL,\
              `Bannedby` varchar(24) NULL,\
              PRIMARY KEY (`AccID`)\
            ) ENGINE=InnoDB DEFAULT CHARSET=latin1;");
           
mysql_query(Query);
Reply
#7

errors

Code:
C:\Users\Robust\Documents\My Received Files\swat.pwn(4068) : error 037: invalid string (possibly non-terminated string)
C:\Users\Robust\Documents\My Received Files\swat.pwn(4068 -- 4076) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Robust\Documents\My Received Files\swat.pwn(4076) : warning 215: expression has no effect
C:\Users\Robust\Documents\My Received Files\swat.pwn(4076) : error 001: expected token: ";", but found ")"
C:\Users\Robust\Documents\My Received Files\swat.pwn(4076) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#8

Mmm

pawn Code:
new Query[ Size ];

strcat(Query, "mysql_query(CREATE TABLE IF NOT EXISTS `Accounts` (\
                `AccID` int(10) NOT NULL AUTO_INCREMENT,\
                `Username` varchar(24) NOT NULL,\
                `Password` varchar(64) NOT NULL,\
                `IP` varchar(16) NULL,\
                `Money` int(15) NULL,\
                `Score` int(15) NULL,\
                `Kills` int(15) NULL"
);
             
strcat(Query, ",\`Deaths` int(15) NULL,\
              `Admin` int(15) NULL,\
              `Donator` int(15) NULL,\
              `Plantedbombs` int(15) NULL,\
              `Defusedbombs` int(15) NULL,\
              `Banned` int(15) NULL,\
              `Banneddate` varchar(16) NULL,\
              `BannedReason` varchar(64) NULL,\
              `Bannedby` varchar(24) NULL,\
              PRIMARY KEY (`AccID`)\
            ) ENGINE=InnoDB DEFAULT CHARSET=latin1;"
);
           
mysql_query(Query);
Reply
#9

Code:
C:\Users\Robust\Documents\My Received Files\swat.pwn(4087) : error 027: invalid character constant
C:\Users\Robust\Documents\My Received Files\swat.pwn(4087) : error 027: invalid character constant
C:\Users\Robust\Documents\My Received Files\swat.pwn(295) : warning 204: symbol is assigned a value that is never used: "Killit"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
in this line

Code:
) ENGINE=InnoDB DEFAULT CHARSET=latin1;");
Reply
#10

pawn Code:
new Query[ size ];

        strcat(Query, "mysql_query(CREATE TABLE IF NOT EXISTS `Accounts` (\
                        `AccID` int(10) NOT NULL AUTO_INCREMENT,\
                        `Username` varchar(24) NOT NULL,\
                        `Password` varchar(64) NOT NULL,\
                        `IP` varchar(16) NULL,\
                        `Money` int(15) NULL,\
                        `Score` int(15) NULL,\
                        `Kills` int(15) NULL,"
);

        strcat(Query, "`Deaths` int(15) NULL,\
                      `Admin` int(15) NULL,\
                      `Donator` int(15) NULL,\
                      `Plantedbombs` int(15) NULL,\
                      `Defusedbombs` int(15) NULL,\
                      `Banned` int(15) NULL,\
                      `Banneddate` varchar(16) NULL,\
                      `BannedReason` varchar(64) NULL,\
                      `Bannedby` varchar(24) NULL,\
                      PRIMARY KEY (`AccID`)) ENGINE=InnoDB DEFAULT CHARSET=latin1;"
);

        mysql_query(Query);
Reply
#11

work thanks +Rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)