Mysql problem. Cant save on quit
#1

hello guys its me again and i have a problem which i didnt have before.

When players do "/q" all of you know onplayerdisconnect happens.
Well its like my onplayerdisconnect doesnt happen because it doesnt save the player information and it doesnt save the vehicle information.

i have a command "/saveme" it calls a public function called q2.
And also my onplayerdisconect calls the same public function called q2 too.

The weird thing here is "/saveme" actually saves in database but when it comes to on player disconnect, it doesnt do anything. anyone has any idea ?

also this car save script gives error too saying i have syntax error, which i really cant see
Код:
mysql_format(mysql, query, sizeof(query), "UPDATE `Vehicles` SET `vehModel` = %i, `vehPlate` = '%e', `vehMod_1` = %i, `vehMod_2` = %i, `vehMod_3` = %i, `vehMod_4` = %i, `vehMod_5` = %i,\
	`vehMod_6` = %i, `vehGun1` = %i,  `vehGun2` = %i,  `vehGun3` = %i, `vehAmmo1` = %i, `vehAmmo2` = %i, `vehAmmo3` = %i WHERE `vehID` = %d", vInfo[vehicleid][vehModel], vInfo[vehicleid][vehPlate],
	vInfo[vehicleid][vehMod][0], vInfo[vehicleid][vehMod][1], vInfo[vehicleid][vehMod][2], vInfo[vehicleid][vehMod][3], vInfo[vehicleid][vehMod][4], vInfo[vehicleid][vehMod][5], vInfo[vehicleid][vehID],vInfo[vehicleid][vehGun1],vInfo[vehicleid][vehGun2],vInfo[vehicleid][vehGun3],
	vInfo[vehicleid][vehAmmo1],vInfo[vehicleid][vehAmmo2],vInfo[vehicleid][vehAmmo3]);
	mysql_query(mysql, query);
Reply
#2

What's your MYSQL Log Saying?

PHP код:
    mysql_format(mysqlquerysizeof(query)//vehPlate = '%e'? Try %s if this didn't turn out.
    
,"UPDATE Vehicles SET vehModel = %i, vehPlate = '%e' , vehMod_1 = %i, vehMod_2 = %i, vehMod_3 = %i, vehMod_4 = %i, vehMod_5 = %i, vehMod_6 = %i, vehGun1 = %i,  vehGun2 = %i,  vehGun3 = %i, vehAmmo1 = %i, vehAmmo2 = %i, vehAmmo3 = %i WHERE vehID = %d"
    
vInfo[vehicleid][vehModel], vInfo[vehicleid][vehPlate], vInfo[vehicleid][vehMod][0], vInfo[vehicleid][vehMod][1], vInfo[vehicleid][vehMod][2], vInfo[vehicleid][vehMod][3], vInfo[vehicleid][vehMod][4], vInfo[vehicleid][vehMod][5], \
      
vInfo[vehicleid][vehID],vInfo[vehicleid][vehGun1],vInfo[vehicleid][vehGun2],vInfo[vehicleid][vehGun3], vInfo[vehicleid][vehAmmo1],vInfo[vehicleid][vehAmmo2],vInfo[vehicleid][vehAmmo3]
    );
    
mysql_tquery(mysqlquery""""); 
Reply
#3

There might be database missing at your MySql database - check the logos from your mysql and check which database might be missing or

as @ismokezu wrote , there might be an miss use of strings or numbers so you need to recheck both in order to figuer it out because sometimes when your database is missing the mysql saving interrupts at the missing db and it does not continue into others.
Reply
#4

Quote:
Originally Posted by ISmokezU
Посмотреть сообщение
What's your MYSQL Log Saying?

PHP код:
    mysql_format(mysqlquerysizeof(query)//vehPlate = '%e'? Try %s if this didn't turn out.
    
,"UPDATE Vehicles SET vehModel = %i, vehPlate = '%e' , vehMod_1 = %i, vehMod_2 = %i, vehMod_3 = %i, vehMod_4 = %i, vehMod_5 = %i, vehMod_6 = %i, vehGun1 = %i,  vehGun2 = %i,  vehGun3 = %i, vehAmmo1 = %i, vehAmmo2 = %i, vehAmmo3 = %i WHERE vehID = %d"
    
vInfo[vehicleid][vehModel], vInfo[vehicleid][vehPlate], vInfo[vehicleid][vehMod][0], vInfo[vehicleid][vehMod][1], vInfo[vehicleid][vehMod][2], vInfo[vehicleid][vehMod][3], vInfo[vehicleid][vehMod][4], vInfo[vehicleid][vehMod][5], \
      
vInfo[vehicleid][vehID],vInfo[vehicleid][vehGun1],vInfo[vehicleid][vehGun2],vInfo[vehicleid][vehGun3], vInfo[vehicleid][vehAmmo1],vInfo[vehicleid][vehAmmo2],vInfo[vehicleid][vehAmmo3]
    );
    
mysql_tquery(mysqlquery""""); 
yes thank you i guess that %e was wrong and i changed my code a little it work now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)