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 |
mysql_format(mysql, query, sizeof(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]);
new query[1000];
Your insert query is already is 483 characters, that's without the values yet. Make the size of your query variable bigger.
Example: pawn Код:
|
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.
|
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;
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; |
Seems like it fixxed the Problem.
If I want to set a Value to 0 cant I simply use "NULL" ? |