PDA

View Full Version : Mysql mismatch error


rinori
17/08/2015, 07:17 PM
error 035: argument type mismatch (argument 1)

format(Qry, sizeof(Qry), "DELETE FROM toys WHERE name= %d AND ID = %d", PlayerInfo[tID][pID], PlayerToyInfo[tID][ToID][ptRealID]);
mysql_query(Qry, OBJECT_REMOVAL, tID, g_con[0]);


Error is at mysql_query line, that's what it shows. Any clue?

MarvinPWN
17/08/2015, 07:20 PM
Try this:
mysql_query(Qry,OBJECT_REMOVAL,tID);
If it doesn't work, how you declare Qry?

rinori
17/08/2015, 07:22 PM
Try this:
mysql_query(Qry,OBJECT_REMOVAL,tID);
If it doesn't work, how you declare Qry?

Not working, g_con is handle connection. Qry is var new Qry[128];

MarvinPWN
17/08/2015, 07:24 PM
Which mysql version do you use?

prineside
17/08/2015, 07:25 PM
I don't know which MySQL plugin was used here, but in most cases mysql_query declaration is mysql_query( connection_handle, query, cache_result). You should try to pass a connection handle as a first argument.

But the best solution is to open your mysql*.inc and search for right function syntax

rinori
17/08/2015, 07:26 PM
Which mysql version do you use?

I don't know which MySQL plugin was used here, but in most cases mysql_query declaration is mysql_query( connection_handle, query, cache_result). You should try to pass a connection handle as a first argument.

But the best solution is to open your mysql*.inc and search for right function syntax

Thank you, sorted it out.

Dutheil
17/08/2015, 07:27 PM
The functions of versions prior to 33 : http://wiki.sa-mp.com/wiki/MySQL
Otherwise : http://wiki.sa-mp.com/wiki/MySQL/R33

Look your a_mysql.inc and look at the top, the version of your include.