SA-MP Forums Archive
[MySQL] argument type mismatch (argument 1) - 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] argument type mismatch (argument 1) (/showthread.php?tid=613029)



[MySQL] argument type mismatch (argument 1) - kampuman - 23.07.2016

After updating my MySQL to the latest version which is R39-5. After compiling my gamemode, it shows more than 20 errors [argument type mismatch (argument 1)]

Here are the samples of the lines with errors
Quote:

mysql_query( gsQuery, THREAD_CHECK_ACCOUNT_USERNAME, playerid );
mysql_query( gsQuery, THREAD_CHECK_ACHEIVEMENTS, playerid );
mysql_query( gsQuery, THREAD_PLAYER_CheckLogin, playerid );
mysql_query( gsQuery, THREAD_CHECK_BANS_LIST, playerid );

Can you please give my an idea how to fix these errors?

Thanks!


Re: [MySQL] argument type mismatch (argument 1) - Jack_SMalls - 23.07.2016

That's because you're not using any defined usage of the MySQL functions.

What version are you coming from? R5?


Re: [MySQL] argument type mismatch (argument 1) - kampuman - 23.07.2016

Quote:
Originally Posted by Jack_SMalls
Посмотреть сообщение
That's because you're not using any defined usage of the MySQL functions.

What version are you coming from? R5?
YES! My gamemode is using R5. And actually i'm also trying to apply this housing system fs that I've downloaded which is using the latest version of MySQL Yet Another House System If I use the latest version then there's no problem with the compiling but in my gamemode it has a lot. So I really don't know now what to do.

I'm not sure which MySQL version can handle both R5 and the latest version R39.


Re: [MySQL] argument type mismatch (argument 1) - Jack_SMalls - 23.07.2016

You'd have to work out converting from R5 to R39. There has been quite a lot of changes since then, as far as writing queries goes.


Re: [MySQL] argument type mismatch (argument 1) - kampuman - 23.07.2016

Yeah, I guess I have no choice. Plus, the errors are only around 20+ so it will not take a lot of time lol.

Edit: someone please help me convert this to R39 format?

PHP код:
stock CheckPlayerAccountplayerid )
{
    
formatgsQuery256"SELECT `IP` FROM `accounts` WHERE `Name` = '%s'"PlayerNameplayerid ) );
    
mysql_querygsQueryTHREAD_CHECK_ACCOUNT_USERNAMEplayerid );