SA-MP Forums Archive
error 035: argument type mismatch (help) - 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: error 035: argument type mismatch (help) (/showthread.php?tid=632809)



error 035: argument type mismatch (help) - PiLLoW - 19.04.2017

any help with this?

error:
Quote:

(4530) : error 035: argument type mismatch (argument 1)

Code:
Quote:

case LOS_SANTOS:
{
format(string, sizeof(string), "UPDATE server SET Gamemode = '%d' WHERE Server = '1'",LAS_VENTURAS);
mysql_query(string);
}

THANK YOU



Re: error 035: argument type mismatch (help) - Banditul18 - 19.04.2017

https://sampwiki.blast.hk/wiki/MySQL/R33#mysql_query

Why nobody look at functions parameters before use?

You are missing connection handler who goes first


Re: error 035: argument type mismatch (help) - PiLLoW - 19.04.2017

can you please give example thank you


Re: error 035: argument type mismatch (help) - Yuri8 - 19.04.2017

Use mysql_format


Re: error 035: argument type mismatch (help) - PiLLoW - 19.04.2017

How example please here's the Code

Quote:

case LOS_SANTOS:
{
format(string, sizeof(string), "UPDATE server SET Gamemode = '%d' WHERE Server = '1'",LAS_VENTURAS);
mysql_query(string);
}




Re: error 035: argument type mismatch (help) - Banditul18 - 19.04.2017

PHP код:
case LOS_SANTOS:
{
    
mysql_format(ConnectionHandler,stringsizeof(string), "UPDATE server SET Gamemode = '%d' WHERE Server = '1'",LAS_VENTURAS);
    
mysql_tquery(ConnectionHandler,string,"","");

Mysql_tquery better for this kind of thing , the first parameter of those 2 things is ConnectionHandler that you use at mysql_connect

Ex:
PHP код:
ConnectionHandler mysql_connect(...); 



Re: error 035: argument type mismatch (help) - skuller12 - 19.04.2017

mysql_query(string);

try

if you have a connection mysql

mysql_query(handle, string);

https://sampwiki.blast.hk/wiki/MySQL/R33#mysql_query

and connection documentation
https://sampwiki.blast.hk/wiki/MySQL/R33#mysql_connect

and simplification

mysql_format(handle, string, sizeof(string), "UPDATE server SET Gamemode = '%d' WHERE Server = '1'",LAS_VENTURAS);
mysql_tquery(handle, string, "", "");


Re: error 035: argument type mismatch (help) - PiLLoW - 20.04.2017

anyone can explain what to do im new in mysql


Re: error 035: argument type mismatch (help) - DTV - 20.04.2017

What are you bumping for? You have two replies that explain what you're doing wrong and how to fix it.


Re: error 035: argument type mismatch (help) - PiLLoW - 20.04.2017

DTV read Pm Thank you