SA-MP Forums Archive
error 075: input line too long - 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: error 075: input line too long (/showthread.php?tid=559082)



error 075: input line too long - Saize - 20.01.2015

Hey guys,

I just started a new GM and now Iґm learning a bit of MySQL.
I was reading a Tutorial and tried to do it by myself, with my own variables.

But to register a player Iґve gotta set many Variables and that seems to be too much for Pawn

How Can I fix it?

Errors:

Quote:

C:\PeMfr\gamemodes\sat.pwn(49 : error 075: input line too long (after substitutions)
C:\PeMfr\gamemodes\sat.pwn(499) : error 037: invalid string (possibly non-terminated string)
C:\PeMfr\gamemodes\sat.pwn(499) : error 017: undefined symbol "INSERT"
C:\PeMfr\gamemodes\sat.pwn(499) : error 017: undefined symbol "INTO"
C:\PeMfr\gamemodes\sat.pwn(499) : fatal error 107: too many error messages on one line

Line:

PHP код:
            mysql_format(mysqlquerysizeof(query), "INSERT INTO `accounts` (`Name`, `Password`, `SkinID`, `Class`, `Money`, `Bank`, `Score` ,`Kills`, `Deaths`, `MissionsCompleted`, `Level`, `EXP`, `Adminlevel`, `VIP`, `TotalVehicles`, `WeaponSlot1`, `WeaponSlot2`, `WeaponSlot3`, `WeaponAmmo1`, `WeaponAmmo2`, `WeaponAmmo3`, `PosX`, `PosY`, `PosZ`, `FacingAngel`, `Bountie`, `BountiesDone`, `TroublesMade`, `Headshots`) VALUES ('%e', '%s','%s', 299, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 ,0 ,0, 0 ,0 ,0, 0 ,0 ,0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0)"Name[playerid], pInfo[playerid][Password], IP[playerid]); 



Re: error 075: input line too long - DobbysGamertag - 20.01.2015

set default values in the database. Saves writing 0 all the time. Default values applies for stuff like score,money,admin etc. Not username, or password


Re: error 075: input line too long - Eyce - 20.01.2015

Your insert query is already is 483 characters, that's without the values yet. Make the size of your query variable bigger.

Example:
pawn Код:
new query[1000];



AW: Re: error 075: input line too long - Saize - 20.01.2015

Quote:
Originally Posted by Eyce
Посмотреть сообщение
Your insert query is already is 483 characters, that's without the values yet. Make the size of your query variable bigger.

Example:
pawn Код:
new query[1000];
This didnt really helped, Iґll try it with default values will give you a feedback if It could fix it

Thanks anyways


Re: AW: Re: error 075: input line too long - Eyce - 20.01.2015

Quote:
Originally Posted by Saize
Посмотреть сообщение
This didnt really helped, Iґll try it with default values will give you a feedback if It could fix it

Thanks anyways
Oh yeah, you could always set the default values on your tables. But if you still prefer your code above, you could cut them into two queries.


AW: Re: AW: Re: error 075: input line too long - Saize - 20.01.2015

Quote:
Originally Posted by Eyce
Посмотреть сообщение
Oh yeah, you could always set the default values on your tables. But if you still prefer your code above, you could cut them into two queries.
Seems like it fixxed the Problem.

If I want to set a Value to 0 cant I simply use "NULL" ?


Re: error 075: input line too long - Eyce - 20.01.2015

You can do something like this if you have a database structure on an SQL or text file:
Код:
CREATE TABLE IF NOT EXISTS `accounts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
...
`weapon` int(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE = InnoDB DEFAULT CHARSET = latin1 AUTO_INCREMENT = 1;



AW: Re: error 075: input line too long - Saize - 20.01.2015

Quote:
Originally Posted by Eyce
Посмотреть сообщение
You can do something like this if you have a database structure on an SQL or text file:
Код:
CREATE TABLE IF NOT EXISTS `accounts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
...
`weapon` int(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE = InnoDB DEFAULT CHARSET = latin1 AUTO_INCREMENT = 1;
Thanks mate +Rep


Re: error 075: input line too long - Eyce - 20.01.2015

You're most welcome.


Re: AW: Re: AW: Re: error 075: input line too long - Vince - 21.01.2015

Quote:
Originally Posted by Saize
Посмотреть сообщение
Seems like it fixxed the Problem.

If I want to set a Value to 0 cant I simply use "NULL" ?
Null isn't equal to zero. Null isn't even equal to itself. Null means "nothing" or "I don't know" and you can't compare nothing with nothing.