SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 13/08/2017, 10:02 AM   #1
ShadowMortar
Huge Clucker
 
Join Date: Jul 2016
Posts: 245
Reputation: 5
Default Mysql problem.

Code:
[10:44:41] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[10:44:41] [ERROR] cache_get_field_content_int - invalid datatype
[10:47:01] [ERROR] CMySQLQuery::Execute[sqlAddHouse] - (error #1264) Out of range value for column 'OwnerID' at row 1
Code:
[10:47:01] [cmd] [[email protected]] /createhouse 1 1
[10:47:01] OnQueryError: errorid: 1264, error: Out of range value for column 'OwnerID' at row 1, callback: sqlAddHouse, query: INSERT INTO `houses` (`OwnerID`, `Created`, `Owned`, `Value`, `OutsideX`, `OutsideY`, `OutsideZ`, `OutsideA`, `InsideX`, `InsideY`, `InsideZ`, `InsideA`, `Interior`, `Locked`, `Alarm`, `AlarmStatus`, `Cash`, `Materials`, `Pot`, `Crack`, `Gun1`, `Gun2`, `Gun3`, `Gun4`, `Tag`, `Level`) VALUES(-1, 1, 0, 1, 1535.305297, -1674.420166, 13.382812, 357.553039, 244.500000, 305.000000, 999.148376, 270.000000, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'House', 2), connectionHandle: 1
SS:
ShadowMortar is offline   Reply With Quote
Old 13/08/2017, 10:09 AM   #2
Vince
Spam Machine
 
Vince's Avatar
 
Join Date: Sep 2007
Location: Belgium
Posts: 11,045
Reputation: 2647
Default Re: Mysql problem.

unsigned columns can only store positive values. If you want to mark the house as unowned you should use null.
__________________
Vince is offline   Reply With Quote
Old 13/08/2017, 10:14 AM   #3
ShadowMortar
Huge Clucker
 
Join Date: Jul 2016
Posts: 245
Reputation: 5
Default Re: Mysql problem.

Quote:
Originally Posted by Vince View Post
unsigned columns can only store positive values. If you want to mark the house as unowned you should use null.
I did, and tried everything, but still not working + because of this mysql error, houses doesnt want to save.
ShadowMortar is offline   Reply With Quote
Old 13/08/2017, 11:45 AM   #4
Vince
Spam Machine
 
Vince's Avatar
 
Join Date: Sep 2007
Location: Belgium
Posts: 11,045
Reputation: 2647
Default Re: Mysql problem.

Make sure the column is nullable because it looks like it isn't right now.
__________________
Vince is offline   Reply With Quote
Old 13/08/2017, 12:20 PM   #5
ShadowMortar
Huge Clucker
 
Join Date: Jul 2016
Posts: 245
Reputation: 5
Default Re: Mysql problem.

Quote:
Originally Posted by Vince View Post
Make sure the column is nullable because it looks like it isn't right now.
Same error.
ShadowMortar 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
Password Hash Problem & MYSQL Saving Problem Faqahat Scripting Help 3 18/04/2016 12:54 PM
[PLUGIN]: MySQL Problem (MYSQL R39-2) zT KiNgKoNg Scripting Help 11 11/11/2014 07:20 PM
[Mysql problem] Loss of communication with the mysql base SmileyCoder General 0 29/05/2014 04:38 PM
saving system mysql(not mysql problem) martoivanov Scripting Help 0 29/08/2013 04:37 PM
Problem with reading money from MySQL in "Clean, Simple MySQL GM" by L3th4l Dystans Help Archive 1 31/05/2011 10:19 PM


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


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