SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 18/01/2015, 09:42 PM   #1
Lynn
Gangsta
 
Lynn's Avatar
 
Join Date: Jan 2010
Location: Detroit, Michigan USA
Posts: 937
Reputation: 108
Default MySQL Car System no saving.

So I'm still trying to create a SQL Car system, and it's just not saving to the Database.
It has to be connecting to the database because my player accounts load fine.
However, for some reason my vehicle system refuses to work.
It creates the vehicle in-game using the command, but doesn't save it after words.
I turned the server off to call OnGameModeExit and it didn't save then either.

Code:
http://pastebin.com/B3Er3J6H

MySQL Log:
http://pastebin.com/qfmb6w4k
__________________
Former developer at Next Generation Gaming
Lynn is offline   Reply With Quote
Old 18/01/2015, 11:27 PM   #2
CoaPsyFactor
Gangsta
 
Join Date: Jul 2010
Location: Belgrade, Serbia
Posts: 866
Reputation: 52
Default Re: MySQL Car System no saving.

as you can see, you have invalid connection handle error, it looks like you are trying to run query on non existing connection. Show us you mysql_connect
__________________
Quote:
Originally Posted by ThaiLuan View Post
Code:
C:\Users\Administrator\Downloads\Viet-RP\gamemodes\3mien.pwn(112016) : fatal error 101: cannot write to file: "disk full"

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


1 Error.
Help me! How to fix error
CoaPsyFactor is offline   Reply With Quote
Old 19/01/2015, 12:30 AM   #3
Lynn
Gangsta
 
Lynn's Avatar
 
Join Date: Jan 2010
Location: Detroit, Michigan USA
Posts: 937
Reputation: 108
Default Re: MySQL Car System no saving.

My Player Accounts load, so it has to be connecting.
Otherwise, they wouldn't load either as their connected from the same database.
__________________
Former developer at Next Generation Gaming
Lynn is offline   Reply With Quote
Old 19/01/2015, 02:02 AM   #4
CoaPsyFactor
Gangsta
 
Join Date: Jul 2010
Location: Belgrade, Serbia
Posts: 866
Reputation: 52
Default Re: MySQL Car System no saving.

well problem is in enum, you have MainPipeline defined in there, so it override you variable that holds mysql connection id - as I don't see mysql_connect in this part of code
__________________
Quote:
Originally Posted by ThaiLuan View Post
Code:
C:\Users\Administrator\Downloads\Viet-RP\gamemodes\3mien.pwn(112016) : fatal error 101: cannot write to file: "disk full"

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


1 Error.
Help me! How to fix error
CoaPsyFactor is offline   Reply With Quote
Old 19/01/2015, 07:15 AM   #5
BroZeus
High-roller
 
BroZeus's Avatar
 
Join Date: Jan 2014
Location: India
Posts: 1,398
Reputation: 173
Default Re: MySQL Car System no saving.

And use this SaveVehicle stock
pawn Code:
SaveVehicles()
{      
        for(new v = 0; v < MAX_VEHICLES; v++)if(IsValidVehicle(v)) SaveVehicle(v);
}
You forgot to write IsValidVehicle(v)
If u don't do this then it will save 2000 vehicles in database with coords 0.0 0.0 0.0 and thus will load 2000 vehicles at those coords
And if there is any other command for creating vehicle or you create vehicle with AddStaticVehicle OnGameModeInit OR if u create vehicle using a FS then this system will bug, this system is only valid if u create cars using createveh command
__________________


"Be the change that you wish to see in the world."

Check out my Github profile!
BroZeus is offline   Reply With Quote
Old 19/01/2015, 08:28 AM   #6
CoaPsyFactor
Gangsta
 
Join Date: Jul 2010
Location: Belgrade, Serbia
Posts: 866
Reputation: 52
Default Re: MySQL Car System no saving.

So, did you fixed it?
__________________
Quote:
Originally Posted by ThaiLuan View Post
Code:
C:\Users\Administrator\Downloads\Viet-RP\gamemodes\3mien.pwn(112016) : fatal error 101: cannot write to file: "disk full"

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


1 Error.
Help me! How to fix error
CoaPsyFactor 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
Using MySQL and ini saving system? kevannkw Scripting Help 1 31/10/2014 07:27 PM
MySQL saving system to DJSON saving system TonyNames Scripting Help 4 21/01/2014 06:27 PM
saving system mysql(not mysql problem) martoivanov Scripting Help 0 29/08/2013 03:37 PM
Saving System MySQL Sanady Scripting Help 21 10/04/2013 03:15 PM


All times are GMT. The time now is 08:08 AM.


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