SA-MP Forums Archive
Mysql mismatch error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Mysql mismatch error (/showthread.php?tid=585911)



Mysql mismatch error - rinori - 17.08.2015

Quote:

error 035: argument type mismatch (argument 1)

Quote:

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?


Re: Mysql mismatch error - MarvinPWN - 17.08.2015

Try this:
PHP код:
mysql_query(Qry,OBJECT_REMOVAL,tID); 
If it doesn't work, how you declare Qry?


Re: Mysql mismatch error - rinori - 17.08.2015

Quote:
Originally Posted by MarvinPWN
Посмотреть сообщение
Try this:
PHP код:
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];


Re: Mysql mismatch error - MarvinPWN - 17.08.2015

Which mysql version do you use?


Re: Mysql mismatch error - prineside - 17.08.2015

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


Re: Mysql mismatch error - rinori - 17.08.2015

Quote:
Originally Posted by MarvinPWN
Посмотреть сообщение
Which mysql version do you use?
Quote:
Originally Posted by prineside
Посмотреть сообщение
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.


Re : Mysql mismatch error - Dutheil - 17.08.2015

The functions of versions prior to 33 : https://sampwiki.blast.hk/wiki/MySQL
Otherwise : https://sampwiki.blast.hk/wiki/MySQL/R33

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