error 035: argument type mismatch (help)
#1

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
Reply
#2

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
Reply
#3

can you please give example thank you
Reply
#4

Use mysql_format
Reply
#5

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);
}

Reply
#6

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(...); 
Reply
#7

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, "", "");
Reply
#8

anyone can explain what to do im new in mysql
Reply
#9

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

DTV read Pm Thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)