Updating mysql please help me out!
#1

Hello guys,
I am trying to update my mysql from r4 to r39
i updated the include and the .dll
but i keep on geting erorr

Код:
error 035: argument type mismatch (argument 1)
What should i chang here to fix this?

Код:
format(sql, sizeof(sql), "UPDATE `samp_trunks` SET `TS1`=1 WHERE PlayerID='%d'", PlayerInfo[playerid][pDBID]); mysql_query(sql, THREAD_UPDATE, playerid);
Please help me out.
Reply
#2

How have you defined sql?

Like this:

pawn Код:
new sql[128]; //128 is an example, could be any value preferably the size of your string
or

pawn Код:
new sql;
The first example is how you should have defined it. The 2nd is how (I think) you've defined it.

If you've defined it properly post more code, it's idiocy thinking we can work with the error line alone.
Reply
#3

I already had it like that.

new sql[128];
Reply
#4

Anyone?
Reply
#5

Please!
Reply
#6

You're doing it completly wrong (well not entirely) you're trying to thread the queries right?

pawn Код:
new Database = 1;


//OnGameModeInit()

public OnGameModeInit()
{
    Database = mysql_connect(...);
    return 1;
}
new sql[130];
format(sql, sizeof(sql), "UPDATE `samp_trunks` SET `TS1`=1 WHERE PlayerID='%d'", PlayerInfo[playerid][pDBID]);
mysql_tquery(Database,sql,"OnTrunkUpdated","i",playerid);

forward OnTrunkUpdated(playerid);
public OnTrunkUpdated(playerid)
{
    //do whatever here.
    return 1;
}


//Or do it this way:


new sql[130];
format(sql, sizeof(sql), "UPDATE `samp_trunks` SET `TS1`=1 WHERE PlayerID='%d'", PlayerInfo[playerid][pDBID]);
mysql_tquery(Database,sql, "","");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)