SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 03/12/2019, 05:03 PM   #1
itachi
Big Clucker
 
Join Date: Jul 2010
Location: Czech Republic
Posts: 180
Reputation: 2
Default HELP MYSQL ERROR Please

yesterday and a few days before it went fine, then all of a sudden there is no spawn in the game of new players.

LOG ERROR :
Code:
[18:00:57 12/03/19] [ERROR] CMySQLQuery::Execute - (error #1364) Field 'Armour' doesn't have a default value (Query: "INSERT INTO ucty3(Username,Heslo,Penize,Skin,XS,YS,ZS,DLRows,DLX,DLY,DLOn,MRows,MX,MY,MOn,Spawn,SpawnTime,IP,Dynamic,Log) VALUES ('Riko',150602188,12000,230,-2236.506591,252.379806,35.826198,3,608,122,1,5,608,155,1,0,1575392457,'62.141.24.76','CDE480F0E4C84DED9EDFA5ADC9E8844488FC0805',1575392457)")
[18:00:57 12/03/19] [ERROR] CMySQLQuery::Execute - (error #1364) Field 'Armour' doesn't have a default value (Query: "INSERT INTO ucty3(Username,Heslo,Penize,Skin,XS,YS,ZS,DLRows,DLX,DLY,DLOn,MRows,MX,MY,MOn,Spawn,SpawnTime,IP,Dynamic,Log) VALUES ('Riko',1,12000,135,-2236.506591,252.379806,35.826198,3,608,122,1,5,608,155,1,0,1575392457,'62.141.24.76','CDE480F0E4C84DED9EDFA5ADC9E8844488FC0805',1575392457)")
[18:00:57 12/03/19] [ERROR] CMySQLQuery::Execute - (error #1364) Field 'Armour' doesn't have a default value (Query: "INSERT INTO ucty3(Username,Heslo,Penize,Skin,XS,YS,ZS,DLRows,DLX,DLY,DLOn,MRows,MX,MY,MOn,Spawn,SpawnTime,IP,Dynamic,Log) VALUES ('Riko',1,12000,135,-2236.506591,252.379806,35.826198,3,608,122,1,5,608,155,1,0,1575392457,'62.141.24.76','CDE480F0E4C84DED9EDFA5ADC9E8844488FC0805',1575392457)")
[18:00:57 12/03/19] [ERROR] CMySQLQuery::Execute - (error #1364) Field 'Armour' doesn't have a default value (Query: "INSERT INTO ucty3(Username,Heslo,Penize,Skin,XS,YS,ZS,DLRows,DLX,DLY,DLOn,MRows,MX,MY,MOn,Spawn,SpawnTime,IP,Dynamic,Log) VALUES ('Riko',1,12000,135,-2236.506591,252.379806,35.826198,3,608,122,1,5,608,155,1,0,1575392457,'62.141.24.76','CDE480F0E4C84DED9EDFA5ADC9E8844488FC0805',1575392457)")
[18:00:57 12/03/19] [ERROR] CMySQLQuery::Execute - (error #1364) Field 'Armour' doesn't have a default value (Query: "INSERT INTO ucty3(Username,Heslo,Penize,Skin,XS,YS,ZS,DLRows,DLX,DLY,DLOn,MRows,MX,MY,MOn,Spawn,SpawnTime,IP,Dynamic,Log) VALUES ('Riko',1,12000,2500,-2236.506591,252.379806,35.826198,3,608,122,1,5,608,155,1,0,1575392457,'62.141.24.76','CDE480F0E4C84DED9EDFA5ADC9E8844488FC0805',1575392457)")
[18:00:57 12/03/19] [ERROR] CMySQLQuery::Execute - (error #1364) Field 'Armour' doesn't have a default value (Query: "INSERT INTO ucty3(Username,Heslo,Penize,Skin,XS,YS,ZS,DLRows,DLX,DLY,DLOn,MRows,MX,MY,MOn,Spawn,SpawnTime,IP,Dynamic,Log) VALUES ('Riko',1,12000,77,-2236.506591,252.379806,35.826198,3,608,122,1,5,608,155,1,0,1575392457,'62.141.24.76','CDE480F0E4C84DED9EDFA5ADC9E8844488FC0805',1575392457)")
[18:00:57 12/03/19] [ERROR] CMySQLQuery::Execute - (error #1364) Field 'Armour' doesn't have a default value (Query: "INSERT INTO ucty3(Username,Heslo,Penize,Skin,XS,YS,ZS,DLRows,DLX,DLY,DLOn,MRows,MX,MY,MOn,Spawn,SpawnTime,IP,Dynamic,Log) VALUES ('Riko',1,12000,2500,-2236.506591,252.379806,35.826198,3,608,122,1,5,608,155,1,0,1575392457,'62.141.24.76','CDE480F0E4C84DED9EDFA5ADC9E8844488FC0805',1575392457)")
[18:00:57 12/03/19] [ERROR] CMySQLQuery::Execute - (error #1364) Field 'Armour' doesn't have a default value (Query: "INSERT INTO ucty3(Username,Heslo,Penize,Skin,XS,YS,ZS,DLRows,DLX,DLY,DLOn,MRows,MX,MY,MOn,Spawn,SpawnTime,IP,Dynamic,Log) VALUES ('Riko',1,12000,230,-2236.506591,252.379806,35.826198,3,608,122,1,5,608,155,1,0,1575392457,'62.141.24.76','CDE480F0E4C84DED9EDFA5ADC9E8844488FC0805',1575392457)")
[18:00:57 12/03/19] [ERROR] CMySQLQuery::Execute - (error #1364) Field 'Armour' doesn't have a default value (Query: "INSERT INTO ucty3(Username,Heslo,Penize,Skin,XS,YS,ZS,DLRows,DLX,DLY,DLOn,MRows,MX,MY,MOn,Spawn,SpawnTime,IP,Dynamic,Log) VALUES ('Riko',1,12000,2500,-2236.506591,252.379806,35.826198,3,608,122,1,5,608,155,1,0,1575392457,'62.141.24.76','CDE480F0E4C84DED9EDFA5ADC9E8844488FC0805',1575392457)")
[18:00:58 12/03/19] [ERROR] CMySQLQuery::Execute - (error #1364) Field 'Armour' doesn't have a default value (Query: "INSERT INTO ucty3(Username,Heslo,Penize,Skin,XS,YS,ZS,DLRows,DLX,DLY,DLOn,MRows,MX,MY,MOn,Spawn,SpawnTime,IP,Dynamic,Log) VALUES ('Riko',1,12000,135,-2236.506591,252.379806,35.826198,3,608,122,1,5,608,155,1,0,1575392458,'62.141.24.76','CDE480F0E4C84DED9EDFA5ADC9E8844488FC0805',1575392458)")
[18:00:58 12/03/19] [ERROR] CMySQLQuery::Execute - (error #1364) Field 'Armour' doesn't have a default value (Query: "INSERT INTO ucty3(Username,Heslo,Penize,Skin,XS,YS,ZS,DLRows,DLX,DLY,DLOn,MRows,MX,MY,MOn,Spawn,SpawnTime,IP,Dynamic,Log) VALUES ('Riko',1,12000,135,-2236.506591,252.379806,35.826198,3,608,122,1,5,608,155,1,0,1575392458,'62.141.24.76','CDE480F0E4C84DED9EDFA5ADC9E8844488FC0805',1575392458)")
[18:00:58 12/03/19] [ERROR] CMySQLQuery::Execute - (error #1364) Field 'Armour' doesn't have a default value (Query: "INSERT INTO ucty3(Username,Heslo,Penize,Skin,XS,YS,ZS,DLRows,DLX,DLY,DLOn,MRows,MX,MY,MOn,Spawn,SpawnTime,IP,Dynamic,Log) VALUES ('Riko',1,12000,2500,-2236.506591,252.379806,35.826198,3,608,122,1,5,608,155,1,0,1575392458,'62.141.24.76','CDE480F0E4C84DED9EDFA5ADC9E8844488FC0805',1575392458)")
[18:00:58 12/03/19] [ERROR] CMySQLQuery::Execute - (error #1364) Field 'Armour' doesn't have a default value (Query: "INSERT INTO ucty3(Username,Heslo,Penize,Skin,XS,YS,ZS,DLRows,DLX,DLY,DLOn,MRows,MX,MY,MOn,Spawn,SpawnTime,IP,Dynamic,Log) VALUES ('Riko',1,12000,135,-2236.506591,252.379806,35.826198,3,608,122,1,5,608,155,1,0,1575392458,'62.141.24.76','CDE480F0E4C84DED9EDFA5ADC9E8844488FC0805',1575392458)")
[18:00:58 12/03/19] [ERROR] CMySQLQuery::Execute - (error #1364) Field 'Armour' doesn't have a default value (Query: "INSERT INTO ucty3(Username,Heslo,Penize,Skin,XS,YS,ZS,DLRows,DLX,DLY,DLOn,MRows,MX,MY,MOn,Spawn,SpawnTime,IP,Dynamic,Log) VALUES ('Riko',1,12000,77,-2236.506591,252.379806,35.826198,3,608,122,1,5,608,155,1,0,1575392458,'62.141.24.76','CDE480F0E4C84DED9EDFA5ADC9E8844488FC0805',1575392458)")
[18:00:59 12/03/19] [ERROR] CMySQLQuery::Execute - (error #1364) Field 'Armour' doesn't have a default value (Query: "INSERT INTO ucty3(Username,Heslo,Penize,Skin,XS,YS,ZS,DLRows,DLX,DLY,DLOn,MRows,MX,MY,MOn,Spawn,SpawnTime,IP,Dynamic,Log) VALUES ('Riko',1,12000,134,-2236.506591,252.379806,35.826198,3,608,122,1,5,608,155,1,0,1575392459,'62.141.24.76','CDE480F0E4C84DED9EDFA5ADC9E8844488FC0805',1575392459)")
TABLE :
Code:
 	CREATE TABLE `ucty3` (
 `ID` int(11) NOT NULL AUTO_INCREMENT,
 `Username` varchar(25) NOT NULL,
 `Heslo` int(11) NOT NULL,
 `Penize` int(11) NOT NULL,
 `Skin` int(11) NOT NULL,
 `Armour` float NOT NULL,
 `WSlot0` int(11) NOT NULL,
 `WSlot1` int(11) NOT NULL,
 `WSlot2` int(11) NOT NULL,
 `ASlot2` int(11) NOT NULL,
 `WSlot3` int(11) NOT NULL,
 `ASlot3` int(11) NOT NULL,
 `WSlot4` int(11) NOT NULL,
 `ASlot4` int(11) NOT NULL,
 `WSlot5` int(11) NOT NULL,
 `ASlot5` int(11) NOT NULL,
 `WSlot6` int(11) NOT NULL,
 `ASlot6` int(11) NOT NULL,
 `WSlot8` int(11) NOT NULL,
 `ASlot8` int(11) NOT NULL,
 `WSlot9` int(11) NOT NULL,
 `ASlot9` int(11) NOT NULL,
 `WSlot10` int(11) NOT NULL,
 `WSlot11` int(11) NOT NULL,
 `Job` int(11) NOT NULL,
 `Lokalita` int(11) NOT NULL,
 `Dovolena` int(11) NOT NULL,
 `Gang` int(11) NOT NULL,
 `KarieraGang` int(11) NOT NULL,
 `AdminLevel` int(11) NOT NULL,
 `VIP` int(11) NOT NULL,
 `Smrt` int(11) NOT NULL,
 `Zabil` int(11) NOT NULL,
 `Vary` int(11) NOT NULL,
 `Wanted` int(11) NOT NULL,
 `SekundVeVezeni` int(11) NOT NULL,
 `TypVezeni` int(11) NOT NULL,
 `Sekundy` int(11) NOT NULL,
 `XS` float NOT NULL,
 `YS` float NOT NULL,
 `ZS` float NOT NULL,
 `PS` int(11) NOT NULL,
 `WS` int(11) NOT NULL,
 `AutPrukaz` tinyint(1) NOT NULL,
 `MotPrukaz` tinyint(1) NOT NULL,
 `LetPrukaz` tinyint(1) NOT NULL,
 `LodPrukaz` tinyint(1) NOT NULL,
 `Vzdelani` int(11) NOT NULL,
 `AktivStyl` int(11) NOT NULL,
 `Box` tinyint(1) NOT NULL,
 `Kungfu` tinyint(1) NOT NULL,
 `Kneehead` tinyint(1) NOT NULL,
 `Grabkick` tinyint(1) NOT NULL,
 `Elbow` tinyint(1) NOT NULL,
 `DLRows` int(11) NOT NULL,
 `DLX` int(11) NOT NULL,
 `DLY` int(11) NOT NULL,
 `DLOn` tinyint(1) NOT NULL,
 `MRows` int(11) NOT NULL,
 `MX` int(11) NOT NULL,
 `MY` int(11) NOT NULL,
 `MOn` tinyint(1) NOT NULL,
 `Spawn` int(11) NOT NULL,
 `SpawnTime` int(11) NOT NULL,
 `IP` varchar(16) NOT NULL,
 `Log` int(11) NOT NULL,
 `Dynamic` varchar(45) NOT NULL,
 PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=2426 DEFAULT CHARSET=cp1250
itachi is offline   Reply With Quote
Old 03/12/2019, 05:33 PM   #2
Joe Staff
High-roller
 
Join Date: Aug 2007
Posts: 2,596
Reputation: 379
Default Re: HELP MYSQL ERROR Please

Then either add the armour column to your entry, or set the armour default value in the Db to 0.0
Joe Staff is offline   Reply With Quote
Old 03/12/2019, 05:39 PM   #3
itachi
Big Clucker
 
Join Date: Jul 2010
Location: Czech Republic
Posts: 180
Reputation: 2
Default Re: HELP MYSQL ERROR Please

how set default value in the DB to 0,0 ?
itachi is offline   Reply With Quote
Old 03/12/2019, 07:24 PM   #4
Calisthenics
Gangsta
 
Join Date: May 2018
Posts: 958
Reputation: 167
Default Re: HELP MYSQL ERROR Please

In table structure, you can alter the table and modify the column to add a default value (within web app). Or you can execute this query once:
pawn Code:
ALTER TABLE `ucty3` CHANGE `Armour` `Armour` float NOT NULL DEFAULT '0.0' AFTER `Skin`;

It is advised to edit the CREATE TABLE too in case you need to import the table in the future:
pawn Code:
`Armour` float NOT NULL DEFAULT '0.0',

What I also noticed is that you have columns WSlot0 to WSlot11. This is against 1NF (repeating groups). Create a separate table.

Another thing is this:
pawn Code:
`Box` tinyint(1) NOT NULL,
 `Kungfu` tinyint(1) NOT NULL,
 `Kneehead` tinyint(1) NOT NULL,
 `Grabkick` tinyint(1) NOT NULL,
 `Elbow` tinyint(1) NOT NULL,
Instead of 5 columns that 4 of them are 0, have a single column name fighting_style and set a value between 0 and 4. You can easily find out which fighting style the player has.
Calisthenics is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL] Error (0): Failed to exeute query. You have an error in your SQL syntax; check the manual that corresponds to you lulo356 Scripting Help 3 24/07/2015 06:58 AM
(error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for t SandKing94 Scripting Help 3 22/05/2015 09:53 AM
[MYSQL ERROR ] Access denied for user 'your username here'@'localhost' (using password: YES) (error ID: 1045). SpikY_ Scripting Help 3 07/11/2014 05:09 PM
MySQL Plugin r39-2 Error: Can't connect to local MySQL server through socket Emre__ Scripting Help 10 30/07/2014 09:26 AM
Mysql queriesYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for th audriuxxx Scripting Help 4 11/04/2014 07:42 PM


All times are GMT. The time now is 06:05 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.