Little problem in MySQL
#1

Hello guys. As I said I have a little problem with MySQL.
It doesn't work:
PHP код:
mysql_format(zMySQLquery2sizeof(query2), "UPDATE `vehicles` SET `Vehicle_Locked_For` = '%d' WHERE `Veh:X` = '%f' AND `Veh:Y` = '%f' AND `Veh:Z` = '%f' AND `Veh:A` = '%f'"//2996 line
            
VehicleData[vehicleid][VehOwner], VehicleData[vehicleid][vSpawnX], VehicleData[vehicleid][vSpawnY], VehicleData[vehicleid][vSpawnZ], VehicleData[vehicleid][vSpawnA]); //2997 line
            
mysql_tquery(zMySQLquery2); 
And pawno compiler says:
Quote:

(2996) -- (2997) : warning 213: tag mismatch
(2996) -- (2997) : warning 213: tag mismatch
(2996) -- (2997) : warning 213: tag mismatch
(2996) -- (2997) : warning 213: tag mismatch

Reply
#2

Anybody can help me for this warnings?
Reply
#3

You don't really need mysql_tquery for a single query, use mysql_query instead
Reply
#4

Please do not help if you don't know what you are doing!

Please tell us about your MySQL plugin version. And I'm sure that your mysql_format line has wrong parameters. Furthermore, show us some more code of that area.
Reply
#5

Do the values match the placeholders? (is VehOwner an integer, vSpawnX a float... etc?)
Reply
#6

Quote:
Originally Posted by Kraeror
Посмотреть сообщение
Hello guys. As I said I have a little problem with MySQL.
It doesn't work:
PHP код:
mysql_format(zMySQLquery2sizeof(query2), "UPDATE `vehicles` SET `Vehicle_Locked_For` = '%d' WHERE `Veh:X` = '%f' AND `Veh:Y` = '%f' AND `Veh:Z` = '%f' AND `Veh:A` = '%f'"//2996 line
            
VehicleData[vehicleid][VehOwner], VehicleData[vehicleid][vSpawnX], VehicleData[vehicleid][vSpawnY], VehicleData[vehicleid][vSpawnZ], VehicleData[vehicleid][vSpawnA]); //2997 line
            
mysql_tquery(zMySQLquery2); 
And pawno compiler says:
I see you're using %d for VehicleData[vehicleid][VehOwner]
Are you sure VehOwner isn't a string? Try using %e instead.
Reply
#7

Above poster : That will not cause any compile errors, there is other problem here
Reply
#8

And plz read this
Quote:
Originally Posted by Logic_
Посмотреть сообщение
Please do not help if you don't know what you are doing!
Reply
#9

Have you made sure that the connection handler has the prefix 'MySQL:'

so
Код:
new MySQL:zMySQL;
Reply
#10

Quote:
Originally Posted by xMoBi
Посмотреть сообщение
Above poster : That will not cause any compile errors, there is other problem here
That won’t cause an error but a tag mismatch. There aren’t compile errors as I can see from his post.
I’ve also noticed there are 4 warnings for tag mismatches, which leads me to think that the %d isn’t the problem but the floats that aren’t defined as floats from the beginning ( VehicleData[vehicleid][vSpawnX] ecc. )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)